int main(void)
{
	int a,b,c,i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}