#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main() {
    int n;
    vector<int> a;
    vector<int> b;
    vector<int> c;
    
    cin >> n;
    
    for (int i = 0; i < n; i++) {
        int tmp1, tmp2, tmp3;
        cin >> tmp1 >> tmp2 >> tmp3;
        a.push_back(tmp1);
        b.push_back(tmp2);
        c.push_back(tmp3);
    }
    
    for (int i = 0; i < n; i++) {
        if (pow(a[i], 2) + pow(b[i], 2) == pow(c[i], 2)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}
