#include <iostream>
#include <cmath>

using namespace std;

int main(){
    int a, b, c, phase, phaseMax;
    phase = 1;

    cin >> phaseMax;
    while(cin >> a >> b >> c) {
        a = pow(a, 2);
        b = pow(b, 2);
        c = pow(c, 2);

        cout << ((a + b == c || b + c == a || c + a == b) ? "YES" : "NO") << endl;

        if(phase++ >= phaseMax) break;
    }

    return 0;
}
