#include <iostream>
using namespace std;

int main()
{
	int samples;
	int *lens, i;
	cin >> samples;
	lens = new int[samples*3]();
	for(i = 0; i<samples*3; i+=3)
		cin >> lens[i] >> lens[i+1] >> lens[i+2];
	for(i = 0; i<samples; i++)
	{
		if(lens[i+2]*lens[i+2] == lens[i]*lens[i]+lens[i+1]*lens[i+1])
		{
			cout << "YES" << endl;
		}
		else
			cout << "NO" << endl;
	}
}