#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	vector<bool> arr;
	for(int i=0;i<n;i++)
	{
		vector<int> cnt;
		int a,b,c;
		cin>>a>>b>>c;
		cnt.push_back(a);
		cnt.push_back(b);
		cnt.push_back(c);
		sort(cnt.begin(),cnt.end());
		if(sqrt(cnt[0]*cnt[0] + cnt[1]*cnt[1]) == cnt[2])
			arr.push_back(true);
		else
			arr.push_back(false);
	}
	for(int i=0;i<arr.size();i++)
	{
		if(arr[i] == true)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}
