#include <iostream>
using namespace std;

int main() {

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

    cin >> a >> b >> c;

    bool flag = false;
    for ( int j = 0; j < 3; j++ ) {

      if ( a*a == b*b + c*c && a < b+c ) {
	flag = true;
	break;
      }

      k = a;
      a = b;
      b = c;
      c = k;

    }

    if ( flag ) {
      cout << "YES" << endl;
    }else {
      cout << "NO" << endl;
    }

  }

  return 0;

}