#include<bits/stdc++.h>
using namespace std;

int main()
{
	int x, a, b, c;
	cin >> x;
	for (int i=1; i<=x; i++)
	{
		cin >> a >> b >> c;
		if (pow(a, 2) + pow(b, 2) == pow(c, 2))
			cout << "YES" << endl;
		else if (pow(c, 2) + pow(a, 2) == pow(b, 2))
			cout << "YES" << endl;
		else if (pow(c, 2) + pow(b, 2) == pow(a, 2))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}