#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    vector<int> side(3,0);
    int N;
    cin >> N;
    for(int i=0; i<N; ++i) {
        for(int j=0; j<3; ++j) cin >> side[j];
        sort(side.rbegin(), side.rend());
        if(side[0]*side[0]==side[1]*side[1]+side[2]*side[2]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

