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