#include <iostream>
using namespace std;

int main()
{
	int ia, ib, ic, iN;
	int TrueFlag[1000];

	while( cin >> iN ){
		
		for( int i=0;i<iN;i++ ){

			cin >> ia >> ib >> ic;

			if( (ia*ia) + (ib*ib) == (ic*ic) )
				TrueFlag[i] = 1;
			else
				TrueFlag[i] = 0;

		}

		for( int i=0;i<iN;i++ ){

			if( TrueFlag[i] == 1 )
				cout << "YES" << endl;
			else
				cout << "NO" << endl;

		}

	}

	return 0;
}