#include
using namespace std;
int main()
{
int no;
cin>>no; // no of numbers
int sum=0;
int k=1;// number count
while(k<=no){
sum=0;
int n;
cin>>n;
while(n/10>=0){
int x=(n%10);
sum=sum+x;
if(n/10==0){
break;
}
n=n/10;
}
if(sum%12!=0){
if(sum%2==0){
if(sum%4==0){
cout<<“Yes”<<endl;
}
else {
cout<<“No”<<endl;
}
}
else if(sum%2!=0){
if(sum%3==0){
cout<<“Yes”<<endl;
}
else{
cout<<"No"<<endl;
}
}
}
else if(sum%12==0){
cout<<“Yes”<<endl;
}
k++;
}
}