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


using namespace std;

bool check(vector<int> n){
	if(hypot(n[0],n[1])==n[2])return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;
		hoge.push_back(a);
		hoge.push_back(b);
		hoge.push_back(c);
		sort(hoge.begin(),hoge.end());
		cout<< ( check(hoge)==true ? "YES" : "NO");
	}
	return 0;
}