#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;

bool isRightTriangle(int a, int b, int c)
{
	return (a * a == b * b + c * c);
}

int main()
{
	int n;
	scanf("%d", &n);

	for (int i = 0; i < n; i++){
		vector<int> triangle;
		for (int j = 0; j < 3; j++){
			int edge;
			scanf("%d", &edge);
			triangle.push_back(edge);
		}
		sort(triangle.begin(), triangle.end());
		puts(isRightTriangle(triangle[2], triangle[1], triangle[0]) ? "YES" : "NO");
	}
	return (0);
}