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

int main() {
	int n,m;
	cin >> n;
	vector<int> a;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++){
			cin >>m;
			a.push_back(m);
		}
		sort(a.begin(),a.end());
		bool ans=(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]);
		if(ans)
		cout <<"YES" << endl;
		else
		cout <<"NO" << endl;
		a.clear();
	}
 	return 0;
}