#include <bits/stdc++.h>

using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int N;
  cin >> N;
  for (int i = 0; i < N; i ++) {
    int a, b, c;
    cin >> a >> b >> c;
    int aa = a * a, bb = b * b, cc = c * c;
    if (aa + bb == cc || bb + cc == aa || cc + aa == bb) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
