#include <stdio.h>
#include <stdlib.h> 
#include <math.h>
int main ()
{
	long a,b,c;
	int n;
	while(scanf("%d",&n)){
		for(int i=0; i<n; i++){
			scanf("%ld %ld %ld",&a,&b,&c);
			if(abs(a*a-b*b)==c*c||a*a+b*b==c*c){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
	}
	return 0;
}