#include <stdio.h>

int fanc(int x, int y, int z)
{
	int r;
	if(x*x + y*y == z*z || x*x + z*z == y*y || z*z + y*y == x*x){
		r = 1;
	}
	else{ r = 0; }

	return r;
}


int main(void)
{
	int n;
	int i;
	int x, y, z;
	
	while(scanf("%d", &n) != EOF){
		for(i = 0; i < n; i++){
			scanf("%d %d %d", &x, &y, &z);
			if(fanc(x, y, z)){ puts("YES"); }
			else{ puts("NO");}
		}
	}
	return 0;
}