#include<iostream>

using namespace std;

void swapof3(int&, int&, int&);
void swap(int&, int&);

int main(){
  int i, n;
  int a, b, c, d, e;
  cin >> n;

  for(i=0; i<n; ++i){
    cin >> a >> b >> c;

    swapof3(a, b, c);
    d = a*a + b*b;
    e = c*c;

    if(d == e)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

void swapof3(int& a, int& b, int& c){
  if(a > b)
    swap(a, b);
  if(b > c)
    swap(b, c);
}

void swap(int& i, int& j){
  int k;
  k = i;
  i = j;
  j = k;
}