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