#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(void){
    int n=0;
    cin >> n;
    int a[n], b[n], c[n];
    REP(i,n) {
        cin >> a[i];
        cin >> b[i];
        cin >> c[i];
    }
    REP(i,n) {
        if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || b[i]*b[i] == a[i]*a[i] + c[i]*c[i] || c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}