#include <bits/stdc++.h>


#define ll long long


using namespace std;

int main () {
	int t;
	ll n;
	scanf ("%d", &t);
	while (t--) {
		scanf ("%lld", &n);
		n = n & (n - 1);
		if (n > 1) printf ("YES\n");
		else printf ("NO\n");
	}
	return 0;
}
