#include<iostream>
using namespace std;

int main(){

	int N, i;
	int *a, *b, *c;
	
	cin >> N;
	
	a = new int[N];
	b = new int[N];
	c = new int[N];

	for( i=0;i<N;i++ ){
		cin >> a[i] >> b[i] >> c[i];
	}

	for( i=0;i<N;i++ ){
		int a2 = a[i] * a[i];
		int b2 = b[i] * b[i];
		int c2 = c[i] * c[i];

		if( a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2 ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

	return 0;
}