#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
  int n;
  int a,b,c;
  vector<int> list;
  vector< vector<int> > lists;

  cin >> n;

  for(int i=0; i<n; i++){
    cin >> a >> b >> c;
    list.clear();
    list.push_back(a);
    list.push_back(b);
    list.push_back(c);
    sort(list.begin(),list.end());
    lists.push_back(list);
  }

  for(int i=0; i<n; i++){
    list = lists[i];
    if(list[0]*list[0] + list[1]*list[1] == list[2]*list[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}