#include<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<set>
#include<cmath>

#define REP(i,s,e) for(int i=int(s);i<int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)


using namespace std;

int main(){

int N;
cin >> N;

int a,b,c;
rep(i,N){

cin >> a >> b >> c;

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

}

return 0;

}