#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
bool is_right_triangle (int a, int b, int c) {
	if (b < a) std::swap(a, b);
	if (c < b) std::swap(b, c);
	if (b < a) std::swap(a, b);
	return (a * a + b * b == c * c);
}
int main(){
	int cnt;
	cin >> cnt;
	for (int i = 0; i < cnt; ++i) {
		int a, b, c;
		cin >> a >> b >> c;
		if (is_right_triangle(a, b, c))		cout << "YES";
		else								cout << "NO";
		cout << "\n";
	}
    return 0;
}