#include<iostream>


using namespace std;

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

}

return 0;
}