#include<iostream>
#include<string>
using namespace std;
int main() {
	int x, a, b, c;
	string ans[10000];
	cin >> x;
	for (int i = 1; i <= x; i++) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		if (a + b == c || a + c == b || b + c == a) {
			ans[i] = "YES";
		}
		else {
			ans[i] = "NO";
		}
	}
	for (int i = 1; i <= x; i++) {
		cout << ans[i] << endl;
	}
	return 0;
}
