#include <cstdio>
#include <cmath>

bool triangle(int x, int y, int z) {
	return pow((double)x, 2) + pow((double)y, 2) == pow((double)z, 2);
}

int main(void) {
	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		int x, y, z;
		scanf("%d %d %d", &x, &y, &z);
		if(triangle(x, y, z) || triangle(y, x, z) || triangle(z, x, y))
			printf("YES\n");
		else
			printf("NO\n");
	}
	return 0;
}