#include <iostream>
#include <string>
using namespace std;

string Right(int a,int b,int c){
    string s;
    if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
        s = "YES";
    else s="NO";

    return s;
}

int main(){
    int n;
    int a,b,c;
    string s;
    while(cin >> n){
        for(int i=0;i<n;i++){
            cin >> a >> b >> c;
            s = Right(a,b,c);
            cout << s << endl;
        }
    }

    return 0;
}