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