#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;

int main() {
    string str;
    int n;
    cin >> n;
    vector<int> vx, vy, vz;
    for(int i = 0; i < n; i++) {
        int x, y, z;
        cin >> x >> y >> z;
        vx.push_back(x);
        vy.push_back(y);
        vz.push_back(z);
    }
    
    for(int i = 0; i < n; i++) {
        vector<int> v;
        v.push_back(vx[i]);
        v.push_back(vy[i]);
        v.push_back(vz[i]);

        sort(v.begin(), v.end());
        if(pow(v[2],2.0) == pow(v[0],2.0) + pow(v[1],2.0)){
            str = "YES";
        } else {
            str = "NO";
        }
        cout << str << endl;
    }  
}