#include <iostream>
using namespace std;

int main()
{
	int a, b, c[4],d;
	cin >> a;
	for (b = 1; b <= a; b++)
	{	
		for(d=1;d<=3;d++)
			cin >> c[b];
		if (c[1] * c[1] == c[2] * c[2] + c[3] * c[3] || c[2] * c[2] == c[1] * c[1] + c[3] * c[3] || c[3] * c[3] == c[2] * c[2] + c[1] * c[1])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}