#include <iostream>

int main() {
	int n, a, b, c;

	std::cin >> n;
	for (int i = 0; i < n; ++i) {
		std::cin >> a >> b >> c;
		a *= a; b *= b; c *= c;
		if (a + b == c || b + c == a || c + a == b) {
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}