#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int n[3],i;
  for(cin>>i;i>0;i--){
    cin >> n[0] >> n[1] >> n[2];
    sort(n,n+3);
    if(n[0]<=1000&&n[1]<=1000&&n[2]<=1000&&0<n[0]&&0<n[1]&&0<n[2]){
      n[2] *= n[2];
      n[1] = n[1]*n[1] + n[0]*n[0];
      if(n[2] == n[1])
	  cout << "YES" << endl;
      else 
	  cout << "NO" << endl;
    }
  }

  return 0;
}