#include <iostream>
#include <vector>
#include <cmath>

int main(int argc, char const *argv[]){
	
	int side_1,side_2,side_3;
	int N;

	std::cin >> N;

	std::vector<bool> result(N);

	for (int i = 0; i < N; ++i){
		std::cin >> side_1 >> side_2 >> side_3;

		side_1 = pow(side_1,2);
		side_2 = pow(side_2,2);
		side_3 = pow(side_3,2);

		if( side_1+side_2==side_3 ||
			side_2+side_3==side_1 || 
			side_3+side_1==side_2 	){

			result[i] = true;
		}else{
			result[i] = false;
		}
	}

	for (int i = 0; i < result.size(); ++i){
		if(result[i]) std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}

	return 0;
}
