//# include<cstdio>
# include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
//while(scanf("%d",&n)!=EOF)//区别啊啊啊啊啊啊啊
{
int m;
scanf("%d",&m);
if(m==0) printf("No\n");
else if(m%16==0) printf("Yes\n");
else printf("No\n");
}
return 0;
}
/*#include<stdio.h>
using namespace std;
int main()
{
int a,t;
scanf("%d",&t);
while(t--)
{
scanf("%d",&a);
if(a==0) printf("No\n");
else if(a%16==0) printf("Yes\n");
else printf("No\n");
}
return 0;
}
*/