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