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

int main()
{
	using namespace std;
	int n;
	cin >> n;

	for (int i = 0; i < n; i++)
	{
		auto square = [](unsigned x) {return x * x; };

		vector<unsigned> sides(3, 0);
		cin >> sides[0] >> sides[1] >> sides[2];
		sort(sides.begin(), sides.end());


		if (square(sides[0]) + square(sides[1]) == square(sides[2]))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}
