#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;

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

int main(){
  int n;
  cin >> n;
  int a, b, c;
  while(n--){
    cin >> a >> b >> c;
    printf("%s\n", is_Right_Triangle(a, b, c) ? "YES" : "NO");
  }
  return 0;
}