#include <iostream>


bool isTriangle(int a, int b, int c) {
  int a2 = a*a, b2 = b*b, c2=c*c;
  int sum = a2 + b2 + c2;
  if ((sum - 2 * std::max(std::max(a2, b2), c2)) == 0)
    return true;
  else
    return false;
}


int main () {
  int a, b, c;
  int n;
  std::cin >> n;
  for (int i = 0; i < n; i ++) {
    std::cin >> a >> b >> c;
    if (isTriangle(a, b, c))
      std::cout << "YES" << std::endl;
    else
      std::cout << "NO" << std::endl;
  }
}