#include <stdio.h>

int main(void)
{
  int a,b,c,n;
  
  scanf("%d",&n);
  while(scanf("%d%d%d",&a,&b,&c)!=EOF){
    
    if(a==(b*b+c*c)/a||b==(c*c+a*a)/b||c==(a*a+b*b)/c)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return(0);
}

  