#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[3];
  rep(i,n){
    rep(j,3){
      cin >> a[j];
    }
    sort(a,a+3);
    //rep(i,3) cout << a[i] << " ";
    if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1]) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}

