#include<iostream>
#include<vector>
#include<math.h>

using namespace std;

int maxnum(int f, int s, int t) {

   if (f >= s && f >= t) {

      return 0;

   }
   else if (s >= f && s >= t) {

      return 1;

   }
   else {

      return 2;

   }

}

bool solve() {

   int n;
   int set[1000][3];
   bool f;

   cin >> n;

   for (long i = 0; i<n; i++) {

      for (long j = 0; j < 3; j++) {

         cin >> set[i][j];

      }

   }

   for (long i = 0; i < n; i++) {

      f = (pow(set[i][0], 2) == (pow(set[i][1], 2) + pow(set[i][2], 2)) || pow(set[i][1], 2) == (pow(set[i][0], 2) + pow(set[i][2], 2)) || pow(set[i][2], 2) == (pow(set[i][0], 2) + pow(set[i][1], 2)));
      f ? cout << "YES\n" : cout << "NO\n";
   }

   return 0;
}

int main() {

   return solve();

}