#include <iostream>
using namespace std;
int main(){
int ans=0;
int N,a,b,c;
cin>>N;
for(int i=0;i<N;i++){
cin>>a>>b>>c;
	if(a*a==b*b+c*c){
	ans=ans+1;}
		else if(b*b==a*a+c*c){
		ans=ans+1;}
		else if(c*c==a*a+b*b){
		ans=ans+1;}
	if(ans==1){
	cout<<"YES"<<endl;}
	if(ans!=1){
	cout<<"NO"<<endl;}
	}
return 0;
}