Rupsa and Equilateral Triangle

All submissions for this problem are available.
Read problems statements in Mandarin Chinese and Russian
Rupsa really loves triangles. One day she came across an equilateral triangle having length of each side as an integer N. She started wondering if it was possible to transform the triangle keeping two sides fixed and alter the third side such that it still remains a triangle, but the altered side will have its length as an even integer, and the line drawn from the opposite vertex to the midpoint of the altered side is of integral length.
Since Rupsa is in a hurry to record a song for Chef as he really loves her songs, you must help her solve the problem as fast as possible.
Input
The first line of input contains an integer T denoting the number of test cases.
Each testcase contains a single integer N.
Output
For each test case, output "YES" if the triangle transformation is possible, otherwise "NO" (quotes for clarity only, do not output).
Constraints
 1 ≤ T ≤ 10^{6}
 1 ≤ N ≤ 5 x 10^{6}
Sub tasks
 Subtask #1: 1 ≤ T ≤ 100, 1 ≤ N ≤ 10^{4} (10 points)
 Subtask #2: 1 ≤ T ≤ 10^{4}, 1 ≤ N ≤ 10^{6} (30 points)
 Subtask #3: Original Constraints (60 points)
Example
Input: 2 5 3 Output: YES NO
Explanation
 In test case 1, make the length of any one side 6, and it will suffice.
Author:  abhra73 
Editorial  http://discuss.codechef.com/problems/ADTRI 
Tags  abhra73, basicmath, easy, oct15, prime 
Date Added:  17082015 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions