#include<iostream>
#include<cmath>

using namespace std;

int main()
{
	int num;

	cin >> num;
	if(num > 1000)
		return -1;

	for(int ix = 0;ix != num;++ix){
		int set[3];
		cin >> set[0] >> set[1] >> set[2];

		if(set[0]<1 || set[1]<1 || set[2]<1 || set[0]>1000 || set[1]>1000 || set[2]>1000)
			break;

		int big=0,other1,other2;
		for(int ix = 0;ix != 3;++ix)
			for(int jx = 0;jx  != 3;++jx)
				if(set[ix] <= set[jx])
					if(set[big] <= set[jx])
						big = jx;
		switch(big){
		case 0:other1 = 1;other2 = 2;
		case 1:other1 = 0;other2 = 2;
		case 2:other1 = 0;other2 = 1;
		}
		if((set[other1]*set[other1] + set[other2]*set[other2])==set[big]*set[big])
			cout <<"YES"<<endl;
		else
			cout <<"NO"<<endl;
	}

	return 0;
}