#include <cstdio>

using namespace std;

int main()
{
  int N;
  scanf(" %d ", &N);
  for (int i = 0; i < N; i++) {
    int a[3];
    for (int j = 0; j < 3; j++) {
      scanf(" %d ", &a[j]);
    }
    for (int j = 0; j < 3; j++) {
      if (a[j] * a[j] == a[(j + 1) % 3] * a[(j + 1) % 3] + a[(j + 2) % 3] * a[(j + 2) % 3]) {
	printf("YES\n");
	goto next;
      }
    }
    printf("NO\n");
  next:;
  }
}