#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,a;
	cin>>n;
	while(n--){
		cin>>a;
		bool flag=false;
		for(int x=0;x*x<a;x++){
			for(int y=x;y*y<a;y++){
				if(x*x+y*y==a){
					flag=true;
				}
			}
		}
		if(flag==true){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}
	return 0;
}

0 comments

No comments so far...

Information

ID
2551
Time
1000ms
Memory
256MiB
Difficulty
8
Tags
# Submissions
63
Accepted
12
Uploaded By