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

int main() {
	int x;
	vector<string> v;
	
	cin >> x;

	for(int i = 0; i < x; i++) {
		int data[3];
		for(int j = 0; j < 3; j++)
			cin >> data[j];
		sort(data, data + 3);

		if(data[2]*data[2] == data[0]*data[0] + data[1]*data[1]) {
			v.push_back("YES");
		} else {
			v.push_back("NO");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}