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

int compare_int(const void *a, const void *b)
{
  return *(int*)a - *(int*)b; 
}

int main()
{
  int n;
  int xs[3];

  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d", &xs[0], &xs[1], &xs[2]);
    qsort(xs, 3, sizeof(int), compare_int);
    if (pow(xs[0], 2.0) + pow(xs[1], 2.0) == pow(xs[2], 2.0)) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }

  return 0;
}

