#include<iostream>
#include<fstream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
	ifstream fi("NHUAN.INP");
	long long n;
	fi>>n;
	long long a[n];
	for(long long i=0;i<n;i++)
        fi>>a[i];
	fi.close();
	ofstream fo("NHUAN.OUT");
	for(long long i=0;i<n;i++)
    {
        if((a[i]%400==0)||(a[i]%4==0 && a[i]%100!=0))
        fo<<"YES"<<endl;
        else {fo<<"NO"<<endl;}
    }
}
