#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <sstream>
using namespace std;

// Is it a Right Triangle?(0003)
int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		vector<int> dat(3);
		for (int j = 0; j < 3; ++j)
			cin >> dat[j];

		sort(dat.begin(), dat.end(), greater<int>());

		if (dat[0] * dat[0] == dat[1] * dat[1] + dat[2] * dat[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}