#include <stdlib.h>
#include <stdio.h>

typedef struct triangle_cont {
	int sideOne;
	int sideTwo;
	int sideThree;
} triangle;

int main () {
	int numberOfTriangles, i;
	scanf("%d", &numberOfTriangles);
	if (numberOfTriangles > 1000)
		return;
	triangle x[numberOfTriangles];
	for (i = 0; i < numberOfTriangles; i++) {
		scanf("%d %d %d", &x[i].sideOne, &x[i].sideTwo, &x[i].sideThree);
	}
	for (i = 0; i < numberOfTriangles; i++) {
		if (x[i].sideOne < 1 || x[i].sideOne >1000) {
			printf("NO\n");
		}
		else if (x[i].sideTwo < 1 || x[i].sideTwo >1000) {
			printf("NO\n");
		}
		else if (x[i].sideThree < 1 || x[i].sideThree >1000) {
			printf("NO\n");
		}
		else if (x[i].sideOne*x[i].sideOne +  x[i].sideTwo * x[i].sideTwo  == x[i].sideThree * x[i].sideThree) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}

}