Doubt in print series

Scanner scn=new Scanner(System.in);

   int N1=scn.nextInt();
   int N2=scn.nextInt();
   int row=1;
   while (row<=N1) {
		   
          int n=1;
          int a=3*n+2;
          while(a%N2 !=0) {
        	  System.out.println(a);
        	  
          }
          
	   
   }

what is wrong in this code
???

Hey @harsh.hj
Some Logical error inside while loop
Some changes in your code
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scn=new Scanner(System.in);

int N1=scn.nextInt();
int N2=scn.nextInt();
int row=1;
int n=1;
while (row<=N1) {

      int a=3*n+2;
      if (a%N2 !=0) {
    	  System.out.println(a);
    	  row++;
      }
	  n++;

}
}
}