#include <algorithm>
#include <iostream>

using namespace std;

inline int sq(int x) {
  return x * x;
}

int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int s[3];
    for (int j = 0; j < 3; j++)
      cin >> s[j];
    sort(s, s+3);
    if (sq(s[0]) + sq(s[1]) == sq(s[2]))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}