#include <iostream>
#include <cmath>
using namespace std;
string isRightTriangle(int a, int b, int c) {
  for(int i = 0; i < 3; ++i) {
	if(pow(a, 2) + pow(b, 2) == pow(c, 2)) {
	  return "YES";
	}
	if(i == 0) swap(a, b);
	if(i == 1) swap(b, c);
  }
  return "NO";
}
int main() {
  int N, s1, s2, s3;
  cin >> N;
  for(int i = 0; i < N; ++i) {
	cin >> s1 >> s2 >> s3;
	cout << isRightTriangle(s1, s2, s3) << endl;
  }
  return 0;
}