#include <iostream>
#include <string>
using namespace std;

string triangle(int x,int y,int z){ //直角三角形なら"YES"を出力する関数
  if(x*x==y*y+z*z) return "YES";
  else if(y*y==z*z+x*x) return "YES";
  else if(z*z==x*x+y*y) return "YES";
  else return "NO";
}

int main()
{
  int n,a,b,c;
  cin >> n;
  
  for(int i=0;i<n;i++){
    cin >> a >> b >> c;
    string str=triangle(a,b,c); //strにstring triangle(int x,int y,int z)を代入
    cout << str << endl;
  }
  return 0;
}