#include <stdio.h>
int main(){
	int a[3];
	int tmp = 0;
	int n = 0;
	scanf("%d",&n);
	
	for(int i = 0; i < n; i++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		
		if(a[0] > a[1]){
			tmp = a[0];
			a[0] = a[1];
			a[1] = tmp;
		}
		if(a[1] > a[2]){
			tmp = a[1];
			a[1] = a[2];
			a[2] = tmp;
		}
		if(a[0] > a[1]){
			tmp = a[0];
			a[0] = a[1];
			a[1] = tmp;
		}

		if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}

	}
	return 0;
}