#include <iostream>
using namespace std;

int main()
{
	int side1[1000], side2[1000], side3[1000], N;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		cin >> side1[i] >> side2[i] >> side3[i];
	}
	for (int i = 0; i < N; ++i) {
		int a = side1[i] * side1[i], b = side2[i] * side2[i], c = side3[i] * side3[i];
		if (a + b == c || a + c == b || b + c == a)cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}