#include <stdio.h>

int main(void) {
	int a,b,c,i,j;
	scanf("%d",&j);
		for (i=1;i<=j;i++){
			scanf("%d%d%d",&a,&b,&c);
			if (a*a + b*b == c*c||a*a + c*c == b*b||c*c + b*b == a*a){
				printf("YES");
			}
			else{
				printf("NO");
			}
			}
		}
		}
	return 0;
}