#include <stdio.h>

int main(int argc,char* argv[]){
  int num;
  int a,b,c;
  int count = 0;
  int ans;

  scanf("%d",&num);

  for(;count < num;++count){
    getchar();
    scanf("%d %d %d",&a,&b,&c);

    if(a > b && b > c){
      ans = (a*a == b*b + c*c) ? 1 : 0;
    }else if(b > c){
      ans = (b*b == a*a + c*c) ? 1 : 0;
    }else{
      ans = (a*a + b*b == c*c) ? 1 : 0;
    }

    printf("%s\n",ans ? "YES" : "NO");
  }

  return 0;
  
}