#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int i, n;
	cin >> n;
	for (i = 1; i <= n; i++){
		int n1, n2, n3, a, b, c;
		cin >> n1 >> n2 >> n3;
		a = n1 > n2 ? n1 : n2;
		b = n1 + n2 - a;
		c = a > n3 ? a : n3;
		a= a + n3 - c;
		if (c == sqrt(a * a + b * b))
			cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}