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

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