#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int N, S[3];
	cin >> N;
	while(N-- > 0) {
		for(int i = 0; i < 3; i++)
			cin >> S[i];
		sort(S, S + 3);
		cout << (S[0] * S[0] + S[1] * S[1] == S[2] * S[2] ? "YES" : "NO") << endl;
	}
}