#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int length[3];
    cin >> n;
    for (int i=0; i<n; i++) {
        bool is_yes = true;
        for (int j=0; j<3; j++) {
            cin >> length[j];
        }
        sort(length, length+3);
        if (length[0]*length[0]+length[1]*length[1] != length[2]*length[2]) {
            is_yes = false;
        }
        if (length[0]+length[1] <= length[2]) {
            is_yes = false;
        }
        if (is_yes) {
            cout << "YES" << endl;
        }
        else {
            cout << "NO" << endl;
        }
    }
    return 0;
}