//a, b, cツつェツ禿シツ療債つウツづェツつスツづつォツ、ツつサツづ個三ツ陛督づーツ篠敖づつ三ツ角ツ形ツつェツ陳シツ角ツ三ツ角ツ形YESツづーツ、ツつサツつ、ツづづ按つ「ツづ按づァNOツづーツ出ツ療債つケツづヲ
//ツ暗ェツ行ツ姪堋づ可表ツつウツづェツづゥnツ嘉アツ閉ェツ、ツデツーツタツセツッツトツづ債堕カツ催敖つキツづゥ

#include<iostream>
#include<algorithm>
using namespace std;

inline int Squere(int x)
{
	return x*x;
}

int main(void)
{
	const int N = 3;
	int a[N];
	int n;
	int i, j;

	cin >> n;
	for(i = 0; i < n; i++)
	{
		for(j = 0; j < N; j++)
			cin >> a[j];
		sort(a, a+N);
		
		if( Squere(a[0]) + Squere(a[1]) == Squere(a[2]) )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}