#include <iostream>
#include <algorithm>

using namespace std;

//??´?§?????§???¢????????¢??°Right_Triangle
bool Right_Triangle(int data[]){
    //????????§?????????????????????
    sort(data, data+3, greater<int>());
    if(data[0]*data[0] == data[1]*data[1] + data[2]*data[2]){
        return true;
    }
    else return false;
}

int main (){
    int i = 0;
    //????????????????????°n
    int n = 0;
    //????????????????????? data
    int data[3];

    cin >> n;

    //??´?§?????§???¢?????????????´??????? ans
    bool ans[n];

    //??\?????????Right_Triangle??????????????????????????£??¨???
    for(i = 0; i < n; i++){
        cin >> data[0] >> data[1] >> data[2];
        if(Right_Triangle(data)) ans[i] = true;
        else ans[i] = false;

    }
    for(i = 0; i < n; i++){
        if(ans[i] == true) cout << "YES\n";
        else cout << "NO\n";
    }
    return 0;
}