#include <iostream>
#include <string>
using namespace std;

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

    string Answer [1000];

    for (int x = 0; x <  TestCase ; x++)
        {
            int a;
            int b;
            int c;
            int o;
            int p;

            cin >> a >> b >> c;

            /* a < b < c */
            if (a < b)
            {
                o = b;
                b = a;
                a = o;
            }
            if (a < c)
            {
                p = c;
                c = a;
                a = p;
            }
            if (c*c + b*b == a*a)
            {
                Answer [x] = "YES";
            }
            else
            {
                Answer [x] = "NO";
            }

        }
    for (int y = 0; y < TestCase; y++)
    {
        cout << Answer [y] << endl;
    }


    return 0;
}