#include<iostream>
using namespace std;
int main()
{
	int N,A[1000],a,b,c;
	cin >> N;
	for (int i = 0; i < N; i++)
	{
		cin >> a>>b>>c;
		if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)
		{
			A[i] = 1;
		}
		else
		{
			A[i] = 0;
		}
	}
	for (int j = 0; j < N; j++)
	{
		if (A[j] == 1)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}
