#include
using namespace std;
int main() {
int N;
cin>>N;
int s=0;
while(N>0){
int f;
cin>>f;
while(f>0){
int r=f%10;
s=s+r;
f=f/10;
}
if(s%2==0 and s%4==0){
cout<<“Yes”<<endl;
}
else if(s%2==0 and s%4!=0){
cout<<"No"<<endl;
}
else if(s%2!=0 and s%3==0){
cout<<“Yes”<<endl;
}
else if(s%2!=0 and s%3!=0){
cout<<"No"<<endl;
}
else{
cout<<“No”;
}
N–;
}
return 0;
}