#include<iostream>
#include<algorithm>
#include<vector>
int main() {
	std::vector<int> on ,tw ,th;
	int n;
	std::cin >> n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		std::cin >> a >> b >> c;
		on.emplace_back(a);
		tw.emplace_back(b);
		th.emplace_back(c);
	}
	for (int i = 0; i < n; i++) {
		int x[3];
		x[0] = on[i];
		x[1] = tw[i];
		x[2] = th[i];
		std::sort(x, x + 3);
		if (x[0]* x[0] + x[1] * x[1] == x[2] * x[2]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}
}