#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
	vector<int> v(3);
	int T;
	
	cin >> T;
	for(int t=0; t<T; t++)
	{
		cin >> v[0] >> v[1] >> v[2];
		std::sort(v.begin(), v.end());

		if(v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) 
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}