import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
int n=scanner.nextInt();
for (int i = 0; i < n; i++) {
int x=scanner.nextInt();
if(x%2==0) {//先判断是不是偶数,是偶数才往下走
int p=1;//用来判断的数字
x=x/2;//x为2时
while(x!=1) {
if(x%2==1) {
p=-1;
break;
}
x=x/2;
}
if(p==1) {
System.out.println(“YES”);
}else {
System.out.println(“NO”);
}
}else {//不是偶数,则直接输出NO
System.out.println("NO");
}
}
}
}