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

bool check_triangle(int a, int b, int c);

int main()
{
	int n;
	int a,b,c;
	cin >> n;
	for(int i=0;i<n;i++) {
		cin >> a >> b >> c;
		if (check_triangle(a,b,c))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

bool check_triangle(int a, int b, int c)
{
	
	vector<int> edges;
	edges.push_back(a);
	edges.push_back(b);
	edges.push_back(c);
	sort(edges.begin(),edges.end());

	if (edges[0]*edges[0] + edges[1]*edges[1]　== edges[2]*edges[2])
		return true;
	else
		return false;		
}