#include<iostream>
#include<cmath>
using namespace std;
bool isRightTriangle(int a,int b,int c){
    if(pow(a,2)==pow(b,2)+pow(c,2))return true;
    else return false;
}
int main(){
    int N;
    cin>>N;
    int tri[3][N];
    for (size_t i = 0; i < N; i++)
    {
        for (size_t j = 0; j < 3; j++)
        {
            cin>>tri[j][i];
            /* code */
        }
        /* code */
    }
    for (size_t i = 0; i < N; i++)
    {
        if(isRightTriangle(tri[0][i],tri[1][i],tri[2][i])||isRightTriangle(tri[1][i],tri[0][i],tri[2][i])||isRightTriangle(tri[2][i],tri[1][i],tri[0][i])){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
        /* code */
    }
    return 0;
}
