public static void main(String args[]) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int x = 0;
int car[] = new int[n - 1];
while (x <= n - 1 && n <= 1000 && n >= 0) {
car[x] = s.nextInt();
x++;
}
int i = 0;
int rem;
int oddsum = 0;
int evensum = 0;
int y;
while (i <= n - 1) {
y = car[i];
while (y > 0) {
rem = y % 10;
if (rem % 2 == 0) {
evensum = evensum + rem;
} else {
oddsum = oddsum + rem;
}
y = y / 10;
}
if (evensum % 4 == 0) {
System.out.println("yes");
} else if (oddsum % 3 == 0) {
System.out.println("no");
}
i++;
}