#include<stdio.h>
int main() {
	int n;
	int i, j;
	int a, b, c;
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d %d %d", &a, &b, &c);
		if (a > c) {
			j = c;
			c = a;
			a = j;
		}
		if (b > c) {
			j = c;
			c = b;
			b = j;
		}
		if (a * a + b * b == c * c)printf("YES\n");
		else printf("NO\n");
	}
}
