#include <iostream>

using namespace std;

int main()
{
    int n;
    int a, b, c;

    cin >> n;
    while (n--) {
        cin >> a >> b >> c;
        a *= a;
        b *= b;
        c *= c;

        if ((a + b - c == 0) || (a + c - b == 0) || (b + c - a == 0))
            cout << "YES\n";
        else
            cout << "NO\n";
    }

    return 0;
}