#include
using namespace std;
void oddEven(int cN){
int sumOfDigit = 0, r=0;
while(cN>0){
r=cN%10;
cN=cN/10;
sumOfDigit = sumOfDigit+r;
}
if(sumOfDigit%2==0){
if(sumOfDigit%4==0)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
else{
if(sumOfDigit%3==0)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
}
int main() {
int num;
cin>>num;
int N;
for(int i=0;i<num;i++){
cin>>N;
oddEven(N);
}
return 0;
}