#include<stdio.h>

int main(){
 int n,a,b,c,i,aa,bb,cc;

 scanf("%d",&n);
 for(i=0;i<n;i++){
  scanf("%d %d %d",&a,&b,&c);
  aa=a*a;
  bb=b*b;
  cc=c*c;
  if((aa+bb)==cc||
     (cc+bb)==aa||
     (cc+aa)==bb){
   printf("YES\n");
  }else{
   printf("NO\n");
  }
 }
 return 0;
}