#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void swap(int *a, int *b)
{
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main()
{
	const int BUFF_SIZE = 100;
	char buff[BUFF_SIZE];
	
	fgets(buff, BUFF_SIZE, stdin);
	int count = atoi(buff);
	
	for (int i = 0; i < count; i++)
	{
		fgets(buff, BUFF_SIZE, stdin);
		int a, b, c;
		sscanf(buff, "%d %d %d", &a, &b, &c);
		
		if (c > b)
		{
			swap(&b, &c);
		}
		if (b > a)
		{
			swap(&a, &b);
		}
		
		int flag = ((a * a) == (b * b + c * c));
		
		printf("%s\n", flag ? "YES" : "NO");
	}
	
	return 0;
}