#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int tri[3],flag[3];
	int n,i;
	while(cin>>n)
	{
		i = 0;
		while(i++ < n)
		{
			cin>>tri[0]>>tri[1]>>tri[2];
			sort(tri,tri+2);
			if(tri[0] < 0||tri[1] < 0||tri[2] < 0)
			{
				flag[i-1] = 0;
			}
			else
			{
				if(tri[0]*tri[0]+tri[1]*tri[1]==tri[2]*tri[2])
				{
					flag[i-1] = 1;
				}
				else
					flag[i-1] = 0;
			}
			
		}
		for(i = 0;i < n;i++)
		{
			if(flag[i]==1)
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
	}
	return 0;
}