#include<bits/stdc++.h>
using namespace std;
int main()
{
long long a,b[1000001],c[1000001];
cin>>a;
for(int i=1;i<=a;i++) cin>>b[i];
for(int i=1;i<=a;i++){
while(b[i]){
c[i]+=b[i]%10;
b[i]/=10;
}
}
for(int i=1;i<=a;i++)if(c[i]%2==1)cout<<"YES"<<endl;else cout<<"NO"<<endl;
return 0;
}