#include<iostream>
#include<math.h>

using namespace std;

int main()
{
	int n;
	int a,b,c; //a^2+b^2=c^2

	cin>>n;

	for(int i=0;i<n;i++)
		{
		cin>>a>>b>>c;
		a = pow(a,2) + pow(b,2);
		c = pow(c,2);
		if( a == c )
			{
				cout<<"YES"<<endl;
			}
		else
			{
				cout<<"NO"<<endl;
			}
		}

}