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

void sort(int data[]) {
    for(int i = 0; i < 3; i++){
        for(int j = i + 1; j < 3; j++){
            if(data[j] < data[i]){
                int tmp = data[j];
                data[j] = data[i];
                data[i] = tmp;
            }
        }
    }
}

int main(void) {
    int i, n;
    cin >> n;
    for (i = 0; i < n; i++) {
        int l[3];
        cin >> l[0] >> l[1] >> l[2];
        sort(l);

        long aa = l[0] * l[0];
        long bb = l[1] * l[1];
        if(sqrt(aa + bb) == l[2]) {
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}