/*
AIZU ONLINE 0003

Is it a Right Triangle?
*/

#include <stdio.h>

main()
{
	int cnt;
	int a,b,c;
	int	i;

	scanf("%d",&cnt);
	for(i=0;i<cnt;i++)
	{	scanf("%d %d %d",&a,&b,&c);


		if(a*a == b*b + c*c ||
           	   b*b == c*c + a*a ||
                   c*c == a*a + b*b)
			printf("YES\n");
		else
			printf("NO\n");

	}
	return(0);
}