#include <iostream>
#include <vector>
#include <algorithm>
//#include <fstream>

using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.tri", "r", stdin );
	int n;
	cin >> n;

	int i,j;
	vector <int> side (3, 0 );

	for (i = 0; i < n; ++i ){
		for (j = 0; j < 3; ++j ){
			cin >> side[j];
		} // end for

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

		if (side[2]*side[2] == side[1]*side[1] + side[0]*side[0] ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if
	} // end for
		
	return 0;
}