#include <bits/stdc++.h>
using namespace std;

int main() {
  int ct = 0;
  vector<int> v(3);
  queue<bool> q;

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());
    q.push(v[2] * v[2] == v[0] * v[0] + v[1] * v[1] ? true : false);
    v.clear();
  }
  for(int i = 0; i < ct; i++) {
    printf("%s\n", q.front() == true ? "YES" : "NO");
    q.pop();
  }
  return 0;
}