#include <iostream>
#include <algorithm>
#include <functional>
inline int mulpli(int a,int b,int c){
  using std::cout;
  using std::endl;
  if(a*a==b*b+c*c){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}
int main(){
  int n,a,b,c;
  using std::cin;
  cin>>n;
  while(n){
    cin>>a>>b>>c;
    if(a==b&&a==c)mulpli(a,b,c);
    if(a>b&&a>c)mulpli(a,b,c);
    if(b>a&&b>c)mulpli(b,a,c);
    if(c>a&&c>b)mulpli(c,a,b);
    n--;
  }
  return 0;
}