#include <bits/stdc++.h>
#include <vector>

using namespace std;

int main () {
    int N, i;
    cin >> N;
    vector<int> A(N), B(N), C(N);
    

for(i = 0; i < N; ++i){
    cin >> A[i] >> B[i] >> C[i];
}

for(i = 0; i < N; ++i){
    if(A[i]*A[i] + B[i]*B[i] == C[i]*C[i] || A[i]*A[i] + C[i]*C[i] == B[i]*B[i] || B[i]*B[i] + C[i]*C[i] == A[i]*A[i]){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
}

}

