#include <iostream>
using namespace std;

int main()
{
	int N;
	cin >> N;
	int* a = new int[N];
	int* b = new int[N];
	int* c = new int[N];
	for(int i=0;i<N;i++){
		cin >> a[i] >> b[i] >> c[i] ;
	}
	for(int i=0;i<N;i++){
		if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i])
			cout << "YES" << endl;
		else if(b[i]*b[i] == a[i]*a[i] + c[i]*c[i])
			cout << "YES" << endl;
		else if(c[i]*c[i] == a[i]*a[i] + b[i]*b[i])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}