#include<iostream>
using namespace std;

int check(int a,int b,int c)
{
	a=a*a;
	b=b*b;
	c=c*c;
	if(a>=b&&a>=c&&a==b+c)
		return 1;
	if(b>=a&&b>=c&&b==c+a)
		return 1;
	if(c>=a&&c>=b&&c==b+a)
		return 1;
	return 0;
}
int main()
{
	int N,a,b,c;
	cin>>N;
	while(N--){
		cin>>a;
		cin>>b;
		cin>>c;
		if(check(a,b,c))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}