//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]^2 == num[1]^2+num[2]^2 || num[1]^2 == num[0]^2+num[2]^2 || num[2]^2 == num[0]^2+num[1]^2)
			printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}