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

int main(){
	int num;//number of data sets
	int temp;

	cin >> num;

	int a[num],b[num],c[num];
	double x,y,z;

	for (int i = 0; i < num; i++)
	{
		cin >> a[i] >> b[i] >> c[i];
	}

	//直角三角形の判別
	for (int i = 0; i < num; i++)
	{
		if (a[i] > b[i])
		{
			temp = a[i]; 
			a[i] = b[i]; 
			b[i] = temp;
		}
		if (b[i] > c[i])
		{
			temp = b[i];
			b[i] = c[i];
			c[i] = temp;
		}

		x = c[i]*c[i];
		y = a[i]*a[i];
		z = b[i]*b[i];

		if(x == (y + z)){
			cout << "YES" << endl;
		} else{
			cout << "NO" << endl;
		}

	}

	return 0;
}
