#include<stdio.h>
#include<stdlib.h>
int main(void){
  int num,i=0;
  int* a;
  int* b;
  int* c;
 
  scanf("%d",&num);

  a=(int*)calloc(num,sizeof(int));
  b=(int*)calloc(num,sizeof(int));
  c=(int*)calloc(num,sizeof(int));


  while(num>i){
    scanf("%d %d %d",(a+i),(b+i),(c+i));
    i++;
    
  }

  for(i=0;num>i;i++){
   *a=*a**a;
   *b=*b**b;
   *c=*c**c;
   if(*a==*c+*b || *b==*a+*c || *c==*b+*a){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
    a++;
    b++;
    c++;
  }
  return 0;
}