#include<iostream>

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    int N;
    cin >> N;
    REP(i, N) {
        int a, b, c;
        cin >> a >> b >> c;
        bool isTri = a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b;
        cout<<(isTri?"YES":"NO")<<endl;
    }
}

int main() {
    solver();
    return 0;
}