#include <iostream>
using namespace std;

int main(){ 
    int a,b,c,s;
    string res;

    cin >> s;
    while(s>0){
        cin >> a >> b >> c; 
        a = a*a;
        b = b*b;
        c = c*c;
        res = "YES";
        if(a!=(b+c) && b!=(a+c) && c!=(a+b)) res="NO";
        cout << res << endl;
        s--;    
    }
    return 0;
}