
#include <stdio.h>

int try(int a, int b, int c){
	if(a*a+b*b==c*c){
		return 1;
	}
	return 0;
}

int main (void){
	int a, b, c, i, n;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}