#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define sqr(x) x*x

int main(){
  int n, f = 0;
  int s1, s2, s3;

  scanf("%d",&n);
  while(n--){
    scanf("%d %d %d",&s1,&s2,&s3);
    f = sqr(s1) == sqr(s2) + sqr(s3) ? 1 : 0;
    f = sqr(s2) == sqr(s1) + sqr(s3) ? 1 : 0;
    f = sqr(s3) == sqr(s1) + sqr(s2) ? 1 : 0;

    if(f) puts("YES");
    else puts("NO");
  }

  return 0;
}