#include <iostream>
using namespace std;

int main(){
  int a, b, c, n;
  cin >> n;
  while((n--) && (cin >> a)){
    cin >> b;
    cin >> c;
    a = a * a;
    b = b * b;
    c = c * c;
    if((a + b == c) || (a + c == b) || (b + c == a)) cout << "YES\n";
    else cout << "NO\n";
  }

  return 0;
}