#include <iostream>
#include <vector>

int main(){
	unsigned int N;
	unsigned int a,b,c;
	std::vector<bool> ans;

	std::cin >> N;

	for(int i = 0; i < N; i++){
		std::cin >> a >> b >> c;
		if(	(a*a + b*b == c*c) ||
			(a*a + c*c == b*b) ||
			(c*c + b*b == a*a)){
			ans.push_back(true);
		}else{
			ans.push_back(false);
		}
	}

	for(auto&& a : ans){
		if(a){
			std::cout << "YES" << std::endl;
		}else{
			std::cout << "NO" << std::endl;
		}
	}
}