#include<iostream>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

#define MAX 256

int main(void){
	
	int n, a, b, c;

	scanf("%d", &n);
	int ans[n];

	for (int i = 0; i < n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if (a > b){
			int d = a;
			a = b;
			b = d;
		}
		if (c < a){
			int d = a;
			a = c;
			c = b;
			b = d;
		}
		else if (c > a&&c < b){
			int d = b;
			b = c;
			c = d;
		}
		if (a*a + b*b == c*c){
			ans[i] = 1;
		}
		else{
			ans[i] = 0;
		}
	}

	for (int i = 0; i < n; i++){
		if (ans[i] == 1)printf("YES\n");
		if (ans[i] == 0)printf("NO\n");
	}

	return 0;
}