#include <iostream>
using namespace std;

bool check_triangle(int a, int b, int c);

int main()
{
	int n;
	int a,b,c;
	cin >> n;
	for(int i=0;i<n;i++) {
		cin >> a >> b >> c;
		if (check_triangle(a,b,c))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

bool check_triangle(int a, int b, int c)
{
	if (a+b<c) 		return false;
	else if(a+c<b) 	return false;
	else if(b+c<a) 	return false;
	else {
		int cc = max(a,(max(b,c)));
		if (cc*cc == a*a + b*b)
			return true;
		else
			return false;
	}			
}