#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
	int a;
	int b;
	int n;
	int c;

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

		return 0;
	}