You are given an integer nn. Check if nn has an odd divisor, greater than one (does there exist such a number xx (x>1x>1) that nn is divisible by xx and xx is odd).
For example, if n=6n=6, then there is x=3x=3. If n=4n=4, then such a number does not exist.
Input
The first line contains one integer tt (1≤t≤1041≤t≤104) — the number of test cases. Then tt test cases follow.
Each test case contains one integer nn (2≤n≤10142≤n≤1014).
Please note, that the input for some test cases won’t fit into 3232-bit integer type, so you should use at least 6464-bit integer type in your programming language.
Output
For each test case, output on a separate line:
“YES” if nn has an odd divisor, greater than one;
“NO” otherwise.
You can output “YES” and “NO” in any case (for example, the strings yEs, yes, Yes and YES will be recognized as positive).
Example
Input
6
2
3
4
5
998244353
1099511627776
Output
NO
YES
NO
YES
YES
NO
#include<stdio.h>
int main()
{
int i,t,k,c;
long long n;
scanf("%d",&t);
while(t--)
{
scanf("%lld",&n);
while(n%2==0)
{
n/=2;//每循环一次,n就减少一倍,使运行时间减少
}
if(n==1)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}