#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>

using namespace std;

static bool judge_rightTri(vector<int> &dataset) {

	sort(dataset.begin(), dataset.end());

	if ((pow(dataset.at(0), 2) + pow(dataset.at(1), 2)) == pow(dataset.at(2), 2)) {
		return true;
	}

	return false;
}

int main(void) {
	int input_num;
	cin >> input_num;

	vector<vector<int>> input(input_num, vector<int>(3, 0));

	for (vector<int> &dataset : input) {
		for (int &data : dataset) {
			cin >> data;
		}
	}

	for (vector<int> &dataset : input) {
		if (true == judge_rightTri(dataset)) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

