#include <iostream>
using namespace std;
int f(int x){
    return x * x;
}

int main(void){
    int n, a, b, c, tmp;
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a >> b >> c;
        if(a > b){
            tmp = a;
            a = b;
            b = tmp;
        }
        if(b > c){
            tmp = b;
            b = c;
            c = tmp;
        }
        if(f(c) == f(a) + f(b))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
    return 0;
}

