#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
using namespace std;

int main(int argc, char *argv[]) {
  int n;
  string yes = "YES";
  string no = "NO";

  cin >> n;
  vector<string> result;
  int tri[3];
  for (int i = 0; i < n; i++) {
    cin >> tri[0] >> tri[1] >> tri[2];
    sort(tri, tri+3);
    int hoge = pow(tri[0], 2) + pow(tri[1], 2);
    result.push_back(pow(tri[2], 2) == hoge ? yes : no);
  }
  for (int i = 0; i < n; i++)
    cout << result[i] << endl;
  return 0;
}