#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

int main() {
    int n;
    int edge[3];
    cin >> n;
    while (n--) {
        cin >> edge[0] >> edge[1] >> edge[2];
        sort(edge, edge+3);
        int t = pow(edge[0], 2) + pow(edge[1], 2);
        double x = sqrt(t);
        if (x == edge[2]) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}
