#include <iostream>
#include <algorithm>
#include <cassert>

bool is_triangle(std::istream& is)
{
	unsigned int length[3];

	is >> length[0] >> length[1] >> length[2];

	assert(!is.fail() && !is.bad());
	assert(length[0] <= 1000 && length[1] <= 1000 && length[2] <= 1000);

	std::sort(length, length + 3);

	return length[0] * length[0] + length[1] * length[1] == length[2] * length[2];
}


int main(void)
{
	int num_cases;

	std::cin >> num_cases;

	for (int i = 0; i < num_cases; i++) {
		std::cout << (is_triangle(std::cin) ? "YES\n" : "NO\n");
	}
	return 0;
}