#include
using namespace std;
int main() {
int n;
cin >> n;
int j;
for (int i=1;i<=n;i++){
long int no;
int sum=0;
cin >> no;
while(no>0){
j= no%10;
sum = sum +j;
no = no/10;
}
if (sum%2==0){
if(sum%4==0 ){
cout << “Yes”<< endl;
}
else {
cout<< “No”<< endl;
}
}
else{
if(sum%3==0){
cout << “Yes”<< endl;
}else{
cout << “No” << endl;
}
}
}return 0;
}