#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
  vector<int> ar;
  int n;
  int d;
  cin >> n;
  for(int i=0;i<n;i++){
    for(int j=0;j<3;j++){
      cin >> d;
      ar.push_back( d );
    }
    sort( ar.begin() , ar.end() , greater<int>() );
    int a = ar[0] * ar[0];
    int b = ar[1] * ar[1];
    int c = ar[2] * ar[2];
    if(a == (b + c)){
      cout << "YES" << endl;
    }else {
      cout << "NO" << endl;
    }
    ar.clear();
  }
}