#include <iostream>
#include <fstream>

using namespace std;

int main()
{
	ifstream input;
	ofstream output;
	int n;

	input.open("NHUAN.inp");
	output.open("NHUAN.out");
	input >> n;
	for (int i = 1; i <= n; i++)
	{
		int a;
		input >> a;
		if (a % 100 == 0)
		{
			if (a % 400 == 0)
			{
				output << "YES";
			}
			else output << "NO";
		}
		else if (a % 4 == 0)
		{
			output << "YES";
		}
		else output << "NO";
		output << '\n';
	}
	input.close();
	output.close();
	return 0;
}