#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>

int main(int argc, char *argv[]){
	//std::ifstream datafile(argv[1]); //input datafile
	std::string str;
	int num[3] = {}; //a, b, c
	int N; //N
	int tmp;

	// if(datafile.fail()){
	// 	std::cout << "error : can't open this file." << std::endl;
	// 	exit(1);
	// }

	//read N
	std::getline(std::cin, str);
	sscanf(str.c_str(), "%d", &N);

	if(N < 0 || N > 1000){
		std::cout << "error : out of constraints" << std::endl;
		exit(1);
	}

	//read dataset
	while(std::getline(std::cin, str)){
		sscanf(str.c_str(), "%d%d%d", &num[0], &num[1], &num[2]);

		for(size_t i = 0; i < 3; i++){
			if(num[i] < 1 || num[i] > 1000){
				std::cout << "error : out of constraints" << std::endl;
				exit(1);
			}
		}

		//bubble sort
		for(size_t i = 0; i < 2; i++){
			for(size_t j = 2; j > i; j--){
				if(num[j-1] > num[j]){
					tmp = num[j-1];
					num[j-1] = num[j];
					num[j] = tmp;
				}
			}
		}

		//Pythagorean theorem
		if(std::pow(num[2], 2) == std::pow(num[0], 2) + std::pow(num[1], 2)){
			std::cout << "YES" << std::endl;
		}else{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}