#include<iostream>
#include<string>

using namespace std;

int main(void)
{
	int nam;
	int a,b,c;
	string str;
	cin >> nam;
	for(int i=0;i<nam;i++)
	{
		cin>>a>>b>>c;
		if( (a*a + b*b) == (c*c) || (a*a + c*c) == (b*b) || (b*b + c*c) == (a*a) )
		{
			str += "YES\n";
		}
		else
		{
			str += "NO\n";
		}
	}
	cout<<str;
	return 0;
}