#include<iostream>
#include<math.h>
using namespace std;

void swap(int &a,int &b){
    int  t=a;
    a=b;
    b=t;
}

void sort(int &a,int &b,int &c){
    if(a < b) swap(a,b);
    if(b < c) swap(b,c);
    if(a < b) swap(a,b);
}

int main(){
    int a[1000],b[1000],c[1000];
    int num;
    int i=0;
    do{
        cin >> num;
    }while(num > 1000);
    while(i < num){
        cin >> a[i] >> b[i] >>c[i];
        if(a[i] >= 1 && a[i] <= 1000)
             if(b[i] >= 1 && b[i] <= 1000)
                 if(c[i] >= 1 && c[i] <= 1000){
                    sort(a[i],b[i],c[i]);
                    i++;
                }
    }
    for(int i=0;i<num;i++){
        if(pow(a[i],2) == (pow(b[i],2) + pow(c[i],2)))
            cout << "YES"<<endl;
        else 
            cout << "NO"<<endl;
    }
    return 0;
}