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

void right(vector<int> &v) {
	if (pow(v[0], 2.0) + pow(v[1], 2.0) == pow(v[2], 2.0)) cout << "YES\n";
	else cout << "NO\n";
}

int main() {
	int t, n, i, j;
	cin >> n;
	vector<int> v;
	for (i = 0; i < n; i++) {
		for (j = 0; j < 3; j++) {
			cin >> t;
			v.push_back(t);
		}
		std::sort(v.begin(), v.end());
		right(v);
	}
	return 0;
}