#include <iostream>
#include <algorithm>
#include<string>
#include<vector>

int main()
{
	int n;
	
	std::cin >> n;
	std::vector<std::string>answer;
	for(int i = 0;i < n;i++)
	{
		std::vector<int>length(3);
		for(int i = 0;i < 3;i++)
		{
			std::cin >> length[i]; 
		}
		std::sort(length.begin(),length.end());
		if((length[0]*length[0]) + (length[1]*length[1]) == (length[2]*length[2]))
		{
			answer.push_back("YES");
		}
		else
		{
			answer.push_back("NO");	
		}
	}

	for(int i = 0;i < n;i++)
	{
		std::cout << answer[i] << std::endl;
	}

	return 0;
}