#include <stdio.h>

int main(){

	int N = 0, a, b, c,i;

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