#include <stdio.h>

int main(int argc, char const *argv[])
{
	int a[1000][3];
	int i, j,k, temp;
	int n;
	scanf("%d", &n);
	for(k=0;k<n;k++) {
		scanf("%d%d%d", &a[k][0], &a[k][1], &a[k][2]);
		for(i=2;i>0;i--) {
			for(j=i;j>1;j--) {
				if(a[k][j]<a[k][j-1]) {
					temp = a[k][j];
					a[k][j-1] = a[k][j];
					a[k][j] = temp;
				}
			}
		}
	}
	for(k=0;k<n;k++) {
		if(a[k][0]*a[k][0]+a[k][1]*a[k][1]==a[k][2]*a[k][2]) {
			printf("YES\n");
		} else {
			printf("NO\n");
		}
	}
	return 0;
}