#include <iostream>
using namespace std;

int a, b, c, n;

int main()
{
    cin >> n;

    for (int i = 0; i < n; ++i) {
        cin >> a >> b >> c;

        if (a > c) swap(a, c);
        if (b > c) swap(b, c);

        cout << (a * a + b * b == c * c ? "YES" : "NO") << endl;
    }

    return 0;
}
