#include<bits/stdc++.h>
using namespace std;


long long a,b,c,n;

int main(){
	cin>>n;
	long long maxs=0;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		int total=a+b+c;
		maxs=max(a,b);
		maxs=max(maxs,c);
		if(maxs>total-maxs) cout<<"NO"<<endl;
		else if(maxs==c){
			if(pow(c,2)==pow(a,2)+pow(b,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==b){
			if(pow(b,2)==pow(a,2)+pow(c,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==c){
			if(pow(a,2)==pow(c,2)+pow(b,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		
	}
}