#include <stdio.h>
#include <math.h>

int main() {
	int N;
	int *a, *b, *c, *ans;
	scanf("%d", &N);

	a = new int[N];
	b = new int[N];
	c = new int[N];
	ans = new int[N];
	for(int i=0; i<N; i++) scanf("%d %d %d",&a[i],&b[i],&c[i]);

	for(int i=0; i<N; i++) {
		if(a[i]>=b[i] && a[i]>=c[i]) {
			if(b[i]*b[i]+c[i]*c[i] == a[i]*a[i]) ans[i] = 1;
			else ans[i] = 0;
		}
		if(b[i]>=a[i] && b[i]>=c[i]) {
			if(a[i]*a[i]+c[i]*c[i] == b[i]*b[i]) ans[i] = 1;
			else ans[i] = 0;
		}
		if(c[i]>=b[i] && c[i]>=a[i]) {
			if(b[i]*b[i]+a[i]*a[i] == c[i]*c[i]) ans[i] = 1;
			else ans[i] = 0;
		}
	}

	for(int i=0; i<N; i++) {
		if(ans[i] == 0) printf("NO\n");
		else printf("YES\n");
	}

	delete[] a;
	delete[] b;
	delete[] c;
	delete[] ans;

	return 0;
}
