#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

void solve()
{
	vector<int> Vec(3);
	int N;
	cin >> N;
	for(int i = 0; i < N; ++i)
	{
		for(int j = 0; j < 3; ++j)
		{
			cin >> Vec[j];
		}
		sort(Vec.begin(), Vec.end());
		if(Vec[0] * Vec[0] + Vec[1] * Vec[1] == Vec[2] * Vec[2])
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}