#include<iostream>
using namespace std;
int main()
{
	int times;
	cin >> times;
	bool * a = new bool[times];
	for (int i = 0; i<times; ++i)
	{
		int q, w, e;
		cin >> q >> w >> e;
		if (q + w>e&&q + e>w&&e + w>q)
		{
			if (q*q + w * w == e * e || w * w + e * e == q * q || q * q + e * e == w * w)
				a[i] = true;
			else a[i] = false;
		}
		else
		{
			a[i] = false;
		}
	}
	for (int i = 0; i<times; ++i)
	{
		if (a[i])    cout << "YES" << endl;
		else    cout << "NO" << endl;
	}

}