#include <iostream>

int main() {
	using namespace std;

	int sampleNum;
	cin >> sampleNum;

	for (; sampleNum > 0; --sampleNum) {
		int a, b, c;
		cin >> a >> b >> c;
		bool right = false;
		right = a * a == b * b + c * c || b * b == c * c + a * a || c * c == a * a + b * b;
		cout << (right ? "YES" : "NO") << endl;
	}

	return 0;
}