#include<cstdio>

using namespace std;

int main()
{
	int a[100];
	int b[100];
	int c[100];
	int len, i;
	
	scanf("%d",&len);
	
	for(i = 0; i < len; i++){
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		scanf("%d",&c[i]);
	}
	
	for(i = 0; i < len; i++){
		if((a[i]*a[i] == b[i]*b[i] + c[i]*c[i])||(b[i]*b[i] == a[i]*a[i]+c[i]*c[i])||(c[i]*c[i] == b[i]*b[i]+a[i]*a[i])){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	
	return 0;
}