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

int main() {
	vector<int> v(3); int n; cin >> n;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) { cin >> v[j]; v[j] = pow(v[j], 2); }
		sort(v.begin(), v.end());
		if (v[0] + v[1] == v[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}
