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