#include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;

	for (int i = 0; i < N; i++) {
		vector<int> v(3);
		cin >> v.at(0) >> v.at(1) >> v.at(2);

		sort(v.begin(), v.end());
		int& a = v.at(0),
			& b = v.at(1),
			& c = v.at(2);
		a *= a;
		b *= b;
		c *= c;
		if (a + b == c) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}
