import java.util.*;
public class Main {
public static void main(String args[]) {
int n,sum=0;
ArrayList<Integer> inputs=new ArrayList();
Scanner sc=new Scanner(System.in);
n=0;
if(sc.hasNextInt()){
n = sc.nextInt();
}
int i = 0;
if(n>=1) {
while(i++ < n)
{
sc.nextLine();
inputs.add(sc.nextInt());
}
}
else {
System.out.print("Wrong Input");
}
for(Integer val:inputs ) {
while(val>0 && val<=1000000000) {
sum = sum + val % 10;
val = val/10;
}
if(sum%2==0 && sum%4==0 ) {
System.out.println("Yes");
}
else if(sum%2!=0 && sum%3==0) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
}
this code is working fine but show wrong answer.Please check