#include <iostream>
#include <math.h>

int check(int a, int b, int c);

int main(){
  int n;
  int a, b, c;
  int longest;
  
  std::cin >> n;
  for(int i=0; i<n; i++){
    std::cin >> a;
    std::cin >> b;
    std::cin >> c;
    
    longest = check(a, b, c);
    switch(longest){
      case 1:
        if(pow((double)a,2.0)==pow((double)b, 2.0)+pow((double)c, 2.0)){
          std::cout << "YES" << std::endl;
        }else{
          std::cout << "NO" << std::endl;
        }
        break;
      case 2:
        if(pow((double)b,2.0)==pow((double)a, 2.0)+pow((double)c, 2.0)){
          std::cout << "YES" << std::endl;
        }else{
          std::cout << "NO" << std::endl;
        }
        break;
      default:
        if(pow((double)c,2.0)==pow((double)a, 2.0)+pow((double)b, 2.0)){
          std::cout << "YES" << std::endl;
        }else{
          std::cout << "NO" << std::endl;
        }
        break;
    }
  }
  
  return 0;
}

int check(int a, int b, int c){
  if(a>b){
    if(a>c) return 1;
    else    return 3;
  }else{
    if(b>c) return 2;
    else    return 3;
  }
}