#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;

int main() {
  int n;
  cin >> n;
  for(int i=0; i<n; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    if (x*x+y*y == z*z || x*x+z*z==y*y || y*y+z*z==x*x)
      cout << "YES"<<endl;
    else
      cout << "NO" << endl;
  }
}