#include <fstream>

using namespace std;

int main()
{
    ifstream a("NHUAN.inp");
    ofstream b("NHUAN.out");
    int i,j;
    a >> i;
    for (int n = 1; n <= i; n++)
    {
        a >> j;
        if (j%100==0)
        {
            if (j%400==0) b << "YES" << endl;
            else b << "NO" << endl;
        }
        else
        {
            if (j%4==0) b << "YES" << endl;
            else b << "NO" << endl;
        }
    }
    a.close();
    b.close();
    return 0;
}
