TRIISO - Playing with isosceles triangle

Naruto was always alone as a kid. He used to get bored a lot and always tried different things for fun. Once he got fascinated by isosceles triangles and developed a game. He will choose a integer value S to be length of the equal sides of the isosceles triangle. Now if it is possible that he can form any triangle which has a third side of even length as well a height of integral value with the third side as base then he becomes happy.

Given S determine if Naruto will be happy.

Input

First line contains T, the number of test cases, T <= 10000.

The next T lines each contain a integer value S < 1000000.

Output

For each of T test cases output YES if Naruto will be happy and NO otherwise

Example

Input:
2
5
8

Output:
YES
NO

Explanation:

In 1st case for S=5, the third side can be 6 and height can be 4.

In 2nd case for S=8, no such combination is possible.


Added by:Abhra
Date:2013-10-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2016-03-02 20:04:25
My 50th :-)
2015-08-21 18:05:04 Anant Upadhyay
good question......
use pythagorus theorem efficiently....
2014-12-25 11:01:11 DEEPAK619
Finally 50th AC
2014-06-27 14:15:46 krishna kumar
Amazing Q !!! learnt the real meaning of an very imp theorm


Last edit: 2014-06-27 14:22:37
2014-06-05 16:15:07 -_-
Nice Question, leart a new property from it :D
2014-02-22 18:47:15 $H!VAM
Please check my solution ID 11116661 .
All the cases i have tried and they match with the code which is AC.
2014-02-10 16:05:27 RIVU DAS
Nice but easy!!
2014-01-31 16:18:27 Anant Kumar
Easy once you get the concept!
2014-01-29 08:51:15 Jumpy
what would be the answers to the cases :
2
16
0
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.