#include<stdio.h>

int main(void)
{
  int n;
  int a[100],b[100],c[100];
  int i;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    scanf("%d",&c[i]);
  }
  for(i=0;i<n;i++){
    if((c[i]*c[i]==a[i]*a[i]+b[i]*b[i]) ||
       (a[i]*a[i]==b[i]*b[i]+c[i]*c[i]) ||
       (b[i]*b[i]==a[i]*a[i]+c[i]*c[i])){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return(0);
  }