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

using namespace std;

int main()
{
    int n;
    vector<int> side(3);

    cin >> n;
    for(int i = 0; i < n; i++)
    {
        cin >> side[0] >> side[1] >> side[2];
        sort(side.begin(), side.end());
        if( side[2]*side[2] == side[1]*side[1] + side[0]*side[0])
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }

    return 0;
}