#include<iostream>
using namespace std;

int main (){
    int  N;
    int a, b, c;
    a <= 1000, b <=1000, c <=1000, N <=1000;
    cin >> N;
    for (int i=0; i < N; i++){
        cin >> a >> b >> c;

        if (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b) {
            cout << "YES" << endl;
        }
        else {
            cout << "NO" << endl;
        }
    }return 0;
}
