#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	int n,x;
	vector<int> len;

	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);

		sort(len.begin(),len.end());
		if(len[0]*len[0]+len[1]*len[1]==len[2]*len[2]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

		len.clear();
	}

}