#include<iostream>
using namespace std;
int main(){
	int n,edge[3];
	cin >>n;
	for(int i=0; i<n; i++){
		cin >>edge[0] >>edge[1] >>edge[2];
		for(int l=0; l<3; l++){
			for(int m=0 ;m<2 ;m++){
				if(edge[m]<edge[m+1]){
					int c = edge[m];
					edge[m] = edge[m+1];
					edge[m+1] = c;
				}
			}
		}
		for(int l=0; l<3; l++){edge[l]=edge[l]*edge[l];}
		if(edge[0] == edge[1]+edge[2]){cout <<"YES"<<endl;}
		else{cout<<"NO"<<endl;}
	}
	return 0;
}