
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
	int N,a,b,c,d[1010],i=0,j=0;
	cin>>N;
	j=N;
		while(j--)
		{
			cin>>a>>b>>c;
			if (a*a+b*b==c*c)
				d[i]=1;
			else
				d[i]=0;
			i++;
		}
		for (i=0;i<N;i++)
		{
			if (d[i])
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
	return 0;
}