#include <iostream>
using namespace std;

int main() {
	int a, b, c, num;

	cin >> num;

	int* bat = new int[ num * 3 ];

	for( int i = 0; i < num; ++i ) {
		cin >> bat[ i*3 + 0 ] >> bat[ i*3 + 1 ] >> bat[ i*3 + 2 ];
	}

	for( int i = 0; i < num; ++i ) {
		a = bat[ i*3 + 0 ];
		b = bat[ i*3 + 1 ];
		c = bat[ i*3 + 2 ];
		if ( a < b ) {
			int t = a;
			a = b;
			b = t;
		}
		if ( a < c ) {
			int t = a;
			a = c;
			c = t;
		}
		
		if ( !( a*a - ( b*b + c*c ) ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	delete[] bat;
}