Problem1626--平方之和

1626: 平方之和

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

小杨有n个正整数a1, a2, ..., an ,他想知道对于所有的i ( 1<=i<=n),是否存在两个正整数x和y满足 x*x+y*y=a。

Input

第一行包含一个正整数n,代表正整数数量。 
之后n行,每行包含一个正整数,代表ai。

Output

对于每个正整数ai,如果存在两个正整数x和y满足x*x+y*y=ai ,输出 Yes,否则输出 No。

Sample Input Copy

2
5
4

Sample Output Copy

Yes
No

Source/Category