#include <iostream>
#include <vector>
#include <numeric>

using namespace std;

int main(){
  int n;
  vector<int> a(3);
  cin >> n;

  while(n--){
    int MAX;
    
    cin >> a[0] >> a[1] >> a[2];
    a[0] *= a[0];
    a[1] *= a[1];
    a[2] *= a[2];
    MAX = max(a[0], max(a[1], a[2]));
        
    if(MAX == accumulate(a.begin(), a.end(), 0) - MAX){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  
  return 0;
}

