#include <iostream>
using namespace std;
bool ok(int a, int b, int c) { return a*a+b*b==c*c; }
int main()
{
    int a, b, c, n;
    cin >> n;
    while (n--) {
        cin >> a >> b >> c;
        if (ok(a, b, c) || ok(b, c, a) || ok(c, a, b)) cout << "YES";
        else cout << "NO";
        cout << endl;
    }
    return 0;
}