#include <iostream>
#include <algorithm>

int main(int argc, char** argv)
{
  int N;

  std::cin >> N;

  int a[3];

  while (N --) {
    std::cin >> a[0] >> a[1] >> a[2];

    std::sort(a + 0, a + 3);

    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }
  }
}