#include <iostream>

using namespace std;

int main()
{
	int a,b, c,i,count;
	bool ret;
	scanf("%d",&count);
	for(i = 0; i < count; i++ ) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		ret = false;
		if( a + b == c ){
			ret = true;
		}
		else if( a + c == b ) {
			ret = true;
		}
		else if ( b + c == a ) {
			ret = true;
		}
		
		if( ret == true ) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}	
	}

	return 0;
}