#include <iostream>
using namespace std;

int main()
{
	int n;
	cin >> n;
	for(int i=0; i<n; ++i)
	{
		int a,b,c;
		cin >> a >> b >> c;
		int a2=a*a, b2=b*b, c2=c*c;
		if(a2+b2==c2 || a2+c2==b2 || b2+c2==a2)
		{
			cout << "YES\n";
		}
		else
		{
			cout << "NO\n";
		}
	}
}