//AOJ0003 Is it a Right Triangle?
#include <stdio.h>

int main(){
	int i,num[3],line;
	scanf("%d",&line);
	for(i = 0; i < line; i++){
		if(scanf("%d %d %d",&num[0],&num[1],&num[2]) == EOF)break;
		if((num[0]*num[0] == num[1]*num[1]+num[2]*num[2])
			|| (num[1]*num[1] == num[0]*num[0]+num[2]*num[2])
			|| (num[2]*num[2] == num[0]*num[0]+num[1]*num[1]))
			printf("YES\n");
		else printf("NO\n");
		num[0]=0;num[1]=0;num[2]=0;
	}
	return 0;
}