#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main( void )
{
	int n;
	cin >> n;

	for ( int c = 0; c < n; c++ )
	{
		vector <int> vertexs;
		for ( int i = 0; i < 3; i++ )
		{
			int vertex;
			cin >> vertex;
			vertexs.push_back( vertex );
		}

		sort( vertexs.begin(), vertexs.end() );

		bool ok = false;
		do
		{
			if ( vertexs[0] * vertexs[0] == vertexs[1] * vertexs[1] + vertexs[2] * vertexs[2] )
			{
				ok = true;
			}
		} while ( next_permutation( vertexs.begin(), vertexs.end() ) );

		if ( ok )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}