
/*
 * main.cpp
 *
 *  Created on: 2011/04/01
 *      Author: satoki
 *      21:47 ~ 22:08
 */
#include <iostream>
#include <string.h>
using namespace std;

int iN;
int iTra[3];
bool bOutput;

bool input() {
  if (iN > 0)
    scanf("%d %d %d", &iTra[0], &iTra[1], &iTra[2]);
  else
    return false;
  iN--;
  return true;
}

void manage() {
  int i, j, tmp;
  for (i = 0; i < 3; i++) {
    iTra[i] *= iTra[i];
  }
  for (i = 0; i < 3; i++) {
    for (j = 2; j > i; j--) {
      if (iTra[j - 1] > iTra[j]) {
        tmp = iTra[j - 1];
        iTra[j - 1] = iTra[j];
        iTra[j] = tmp;
      }
    }
  }
  if (iTra[0] + iTra[1] == iTra[2])
    bOutput = true;
  else
    bOutput = false;
}

int main() {
  scanf("%d", &iN);
  while (1) {
    if (!input()) break;
    manage();
    if (bOutput)
      printf("YES\n");
    else
      printf("NO\n");
  }
}