#include<iostream>
using namespace std;

bool isRightTri(int a,int b,int c);
void swap(int& a,int &b);

int main(void){
  int n,a,b,c;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a>>b>>c;
    if(isRightTri(a,b,c)) cout<<"YES"<<endl; 
    else cout<<"NO"<<endl;
  }
  return 0;
}

bool isRightTri(int a,int b,int c){
  if(a>b) swap(a,b);
  if(b>c) swap(b,c);
  if(a*a+b*b-c*c==0) return true;
  return false;
}

void swap(int& a,int &b){
  int tmp;
  tmp=b;
  b=a;
  a=tmp;
}