#include <iostream> 
#include <fstream> 
#include <stdlib.h> 
#include <stdio.h>
using namespace std;

// data typically into global variables here

int main () { 
  // string fname = "input";
  int input [3] = {0, 0, 0};
  int N, i, j, max, maxj, c;
  cin >> N;
  for(; i<N; i++){
    max = maxj = 0;
    for (j=0; j < 3; j++){
      cin >> input[j];
      if (input[j] > max){
	max = input[j];
	maxj = j;
      }
    }
    //check pythagorus
    c = 0;
    for (j=0; j<3; j++){
      if (j != maxj){
	c += input[j]*input[j];
      }
    }
    if (max*max == c){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  // printf("top 3: %d %d %d\n", top[0], top[1], top[2]);
  return 0; 
} 
  
 