#include <sstream>
#include <iostream>
#include <string>
#include <algorithm>
 
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

using namespace std;

int main(){
	int n;
	cin >> n;
	int e[3];
	REP(i,n){
		REP(j,3)cin>>e[j];
		sort(e, e+3);
		if(e[0]*e[0]+e[1]*e[1]==e[2]*e[2])cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}