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


using namespace std;

string check(int a,int b,int c){
	if(a*a+b*b==c*c)return "YES";
	else return "NO";
}


int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		vector<int> n;
		int a,b,c;
		cin>>a>>b>>c;
		n.push_back(a);
		n.push_back(b);
		n.push_back(c);
		sort(n.begin(),n.end());
		string ans=check(a,b,c);
		cout<<ans<<endl;
	}
	return 0;
}