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

using namespace std;

int main()
{
    int n;
    cin >> n;
    while(n-- > 0) {
        vector<int> edge;
        for(int i = 0; i < 3; i++) {
            int e;
            cin >> e;
            edge.push_back(e);
        }
        sort(edge.begin(), edge.end(), greater<int>());
        if((edge[0] * edge[0]) == (edge[1] * edge[1] + edge[2] * edge[2])) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}