#include<bits/stdc++.h>
using namespace std;
int p[260141];
int b=1;
void bnp()
{
bool a;
p[0]=2;
for(int A=2;A<=3651175;A++)
{
a=true;
for(int B=0;B<b;B++)
{
if(p[B]>sqrt(A))
{
break;
}
if(A%p[B]==0)
{
a=false;
break;
}
}
if(a)
{
p[b]=A;
b++;
}
}
}
int main()
{
bnp();
long long a;
cin>>a;
long long c;
int e,d;
for(int A=0;A<a;A++)
{
cin>>c;
if(c==2 || c==3)
{
cout<<0<<endl;
continue;
}
e=0;
d=0;
while(p[e]<=sqrt(c))
{
if(c%p[e]==0)
{
d++;
}
e++;
}
if(pow(2,d+1)<=c)
{
cout<<1<<endl;
}
else
{
cout<<0<<endl;
}
}
}
感谢感谢,好人一生平安。