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


int main()
{
	int a[3] ,n;
	vector<bool> dst;
	cin >> n;
	while (n-- > 0) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		dst.push_back(a[0]*a[0] + a[1]*a[1] == a[2] * a[2]);
	}
	for (vector<bool>::iterator it = dst.begin(); it < dst.end(); it++)
		cout << ((*it)?"YES":"NO") << endl;
	return 0;
}
