import std.algorithm;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;

bool isSquare (int n)
{
	auto p = cast (int) (sqrt (n * 1.0) + 0.5);
	return p * p == n;
}

void main ()
{
	auto tests = readln.strip.to !(int);
	foreach (test; 0..tests)
	{
		auto n = readln.strip.to !(int);
		while (true)
		{
			if (n & 1)
			{
				writeln ("NO");
				break;
			}
			n /= 2;
			if (isSquare (n))
			{
				writeln ("YES");
				break;
			}
		}
	}
}
