#include<iostream>
#include<cstdio>
using namespace std;
bool yes[1001];
int main()
{
	int n,a,b,c,q,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		if(b>a){q=a;a=b;b=q;}
		if(c>a){q=a;a=c;c=q;}
		if((a*a)==(b*b)+(c*c))yes[i]=true;
		else yes[i]=false;
	}
	for(i=1;i<=n;i++)
	{
		if(yes[i]==true)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}