#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	float cant,a,b,hip;
	cin>>cant;
	for(int i=0;i<cant;i++)
	{
		cin>>a>>b>>hip;
		if(sqrt((a*a)+(b*b))==hip)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}