Code not proceeding after taking input and

Scanner sc= new Scanner(System.in);
int sum1=0,sum2=0;
int n= sc.nextInt();
int a[]= new int[n];
for(int i=0;i<n;i++){
System.out.println();
a[i]= sc.nextInt();
}
for (int i=0;i<n;i++){
int j=1;
while(a[i]!=0){
int ld= a[i]%10;
if (j%2==1) sum1+= ld;
else sum2+= ld;
j++;
}
if(j%2==0){
if(sum1%4==0 || sum2%3==0) System.out.println(“Yes”);
else System.out.println(“No”);
}
else{
if(sum2%4==0 || sum1%3==0) System.out.println(“Yes”);
else System.out.println(“No”);
}
}

The above code is for the odd-even problem in the first challenge when I submitted this code online; it gives that time limit extends.
And when I tried to run in eclipse offline, it is not proceeding after taking input.
please tell me where I went wrong

@Vishu_1801,
I have made some changes to your code: https://ide.codingblocks.com/s/195741
And added comments on the lines changed.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.