#include <iostream>
#include <algorithm>

int isRightTriangle(int a, int b, int c)
{
	int s[3] = {a, b, c};
	std::sort(s, s+3);
	return (s[0] > 0) && (s[2] * s[2] == s[0] * s[0] + s[1] * s[1]);
}

int main()
{
	int count = 0;
	std::cin >> count;
	for (int i = 0; i < count; ++i) {
		int a = 0, b = 0, c = 0;
		std::cin >> a >> b >> c;
		std::cout << (isRightTriangle(a,b,c) ? "YES" : "NO") << std::endl;
	}

	return 0;
}