#include<iostream>
int main()
{
	int N;
	std::cin >> N;
	bool*result = new bool[N];
	for(int i = 0; i < N; i++)
	{
		int a, b, c;
		std::cin >> a >> b >> c;
		result[i] = a * a + b * b == c * c || a * a + c * c == b * b || b * b + c * c == a * a;
	}
	for(int i = 0; i < N; i++)
	{
		std::cout << (result[i] ? "YES" : "NO") << std::endl;
	}
	return 0;
}
