# include <stdio.h>
int main (void)
{
	int ri,repeat;
	int a,b,c;
	scanf("%d",&repeat);
	for (ri=1;ri<=repeat;ri++){
		scanf("%d%d%d",&a,&b,&c);
		if (a>b&&a>c)
			if ((a*a)==(b*b+c*c))
				printf("YES\n");
			else printf("NO\n");
		else if (b>a&&b>c)
			if ((b*b)==(a*a+c*c))
				printf("YES\n");
			else printf("NO\n");
		else if (c>b&&c>a)
			if ((c*c)==(b*b+a*a))
				printf("YES\n");
			else printf("NO\n");
		else printf("NO\n");
	}
	return 0;
}