#include<iostream>
#include<queue>
using namespace std;

int main()
{
	priority_queue<int> que;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		for (int j = 0; j < 3; j++)
		{
			cin >> a;
			que.push(a);
		}
		a = que.top();
		que.pop();
		b = que.top();
		que.pop();
		c = que.top();
		que.pop();
		if (a*a==b*b+c*c)
			cout << "YES";
		else
			cout << "NO";
	}
	return 0;
}