#include <stdio.h>
#include <stdlib.h>

int main(){
	int i,j;
	int *l[3];
	int n;
	int *tmp,*t,*sum;

	scanf("%d",&n);

	for(i=0;i<3;i++){
		l[i] = (int *)malloc(sizeof(int)*n);
	}
	
	for(i=0;i<n;i++){
		scanf("%d %d %d",&l[i][0],&l[i][1],&l[i][2]);
	}

	tmp = (int *)malloc(sizeof(int)*n);
	t = (int *)malloc(sizeof(int)*n);
	sum = (int *)malloc(sizeof(int)*n);

	for(i=0;i<n;i++){
		tmp[i]=0;
		t[i]=0;
		sum[i]=0;
		for(j=0;j<3;j++){
			if(tmp[i] < l[i][j]){
				tmp[i] = l[i][j];
				t[i] = j;
			}
		}
		for(j=0;j<3;j++){
			if(j!=t[i]){
				sum[i] += (l[i][j]*l[i][j]);
			}
		}

		if(sum[i] == tmp[i]*tmp[i]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		
	}	

	return 0;
}