#include<iostream>
using namespace std;

int main(void)
{
	const int Size = 1000;
	int size;
	int a,b,c,get_bool[Size]={0};
	
	cin >> size;
	for(int i=1;i<=size;i++)
	{
		cin >> a >> b >> c;
		if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
			get_bool[i]++;
		else 
			get_bool[i]=0;
	}
	
	for(int i=1;i<=size;i++)
	{
		if(get_bool[i]!=0)
			cout << "YES\n";
		else 
			cout << "NO\n";
	}
	return 0;
}
