
#include <iostream>
#include <stdlib.h>
using namespace std;
int cmp(const void *a,const void *b)
{
	return *(int*)a-*(int*)b;
}
int main()
{
	int N,i,a[3];
	cin>>N;
	for (i=0;i<N;i++)
	{
			cin>>a[0]>>a[1]>>a[2];
			qsort(a,3,sizeof(int),cmp);
			if (a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				//d[i]=1;
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
				//d[i]=0;
			//i++;
	}
	return 0;
}