#include<iostream>
#include<queue>
#include<cmath>
using namespace std;

void reOrder(int &a,int &b,int &c)
{
	int b1,b2,b3;
	b1 = a > b?(a > c? a:c):( b>c?b:c);
	b3 = a < b? (a < c? a:c):(b < c?b:c);
	b2 = a+b+c - b1 - b3;
	//
	a = b2;
	b = b3;
	c = b1;
}
int main(){

	int g,a,b,c;

	cin>>g;
	for(int i = 0; i < g; i ++)
	{
		cin>>a>>b>>c;
		{
			reOrder(a,b,c);
			if(a*a + b*b == c*c)
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}

	}

	
    return 0;
}