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

int main()
{
	int n;

	std::cin >> n;

	for(int i=0; i<n; ++i)
	{
		std::vector<int> length;

		int k;

		for(int i=0; i<3; ++i)
		{
			std::cin >> k;

			length.push_back(k);
		}
		std::sort(length.begin(),length.end());

		std::cout << (length[2]*length[2]==length[1]*length[1]+length[0]*length[0] ? "YES\n" : "NO\n");
	}
}