#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
	{
		int e[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", e+j);
		sort(e, e+3);

		if (e[0]*e[0]+e[1]*e[1] == e[2]*e[2])
			puts("YES");
		else
			puts("NO");
	}

	return 0;
}