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