#include<iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;

    int x[n];
    int y[n];
    int z[n];

    for(int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i] >> z[i];
    }

    for(int j = 0; j < n; j++)
    {
        if(x[j] * x[j] == y[j] * y[j] + z[j] * z[j]
        || y[j] * y[j] == z[j] * z[j] + x[j] * x[j] 
        || z[j] * z[j] == x[j] * x[j] + y[j] * y[j])
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
} 