#include <cstdio>

int main()
{
	int N, ia, ib, ic;
	int iTrueFlag[1000];

	scanf("%d",&N);

	for( int i=0;i<N;i++ ){
		scanf("%d %d %d",&ia, &ib, &ic);

		if( (ia*ia) + (ib*ib) == (ic*ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<N;i++ ){
		if( iTrueFlag[i] == 1)
			printf("YES\n");
		else
			printf("NO\n");
	}

	return 0;
}