#include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x*x;
		y = y*y;
		z = z*z;
		if(x>y&&x>z){
			if(x==(z+y))printf("YES\n");
			else printf("NO\n");
		}
		else if(y>z&&y>x){
			if(y==(x+z)) printf("YES\n");
			else printf("NO\n");
		}
		else {
			if(z==(x+y))printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}