public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N1 = scan.nextInt();
int N2 = scan.nextInt();
int n = 1;
int i = 0;
if(0<N1 && N1<100 && 0<N2 && N2<100) {
while(i<N1) {
if(((3*n)+2) % N2 !=0) {
System.out.println((3*n)+2);
i++;
}
n++;
}}
}
My code is running well in STS for each scenario. But here it is not able to pick Scanner class fron java.util package