#include<iostream>
#include<cmath>

//??´?§?????§???¢?????????????????????????????¢??°
int triangle(int a, int b, int c){
  if(a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b){
    return 1; //??´?§?????§???¢??§????????¨???
  }
  else
    return 0; //??´?§?????§???¢??§????????¨???
}

int main(){
  int a, b, c; //3???????????°
  int n; //???????????????????????°
  
  //std::cout << "Input the number of dataset\n";
  std::cin >> n;

  int ans[n];
  for(int i=0; i<n; i++){
    std::cin >> a >> b >> c;
    ans[i] = triangle(a, b, c);
  }

  for(int i=0; i<n; i++){
    if(ans[i] == 1)
      std::cout << "YES\n";
    else if(ans[i] == 0)
      std::cout << "NO\n";
  }
  
  return 0;
  
}