#include <cstdio>
#include <cmath>

using namespace std;

int main()
{
	int n, x, y, z;

	scanf("%d", &n );

	for ( int i = 0; i < n; i++ )
	{
		scanf("%d %d %d", &x, &y, &z );

		if ( pow( x, 2 ) + pow( y, 2 ) == pow( z, 2 ) || pow( x, 2 ) + pow( z, 2 ) == pow( y, 2 ) || pow( y, 2 ) + pow( z, 2 ) == pow( x, 2 ) )
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}

	return 0;
}