#include <iostream>
#include <vector>
#include <algorithm>

#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;

bool chks(int a, int b, int c){
	if( a * a == b * b + c * c ) return true;
	if( b * b == a * a + c * c ) return true;
	if( c * c == b * b + a * a ) return true;
	return false;
}

int main(void){

int N,i;
bool sss;
	cin >> N;
	vector<vector<int> > s(N,vector<int>(3));

	rep(i,N) cin >> s[i][0] >> s[i][1] >> s[i][2];
	rep(i,N){
		sss = chks(s[i][0] , s[i][1] , s[i][2]);
		cout << (sss? "YES": "NO") << endl;
	}
	return 0;
}