#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

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

    for (int i = 0; i < N; i++)
    {
        double a, b, c, l;
        cin >> a >> b >> c;
        if (max({a, b, c}) == c)
        {
            if (a * a + b * b == c * c)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else if (max({a, b, c}) == b)
        {
            if (a * a + c * c == b * b)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else if (max({a, b, c}) == a)
        {
            if (c * c + b * b == a * a)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else
            cout << "NO" << endl;
    }
    return 0;
}
