#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int v1,v2,v3;
		vector<int> v;
		cin >>v1>>v2>>v3;
		v.push_back(v1);
		v.push_back(v2);
		v.push_back(v3);
		sort(v.begin(),v.end(),greater<int>());
		cout <<(v[0]*v[0] == v[1]*v[1]+v[2]*v[2]?"YES":"NO")<< endl;
	}
	return 0;
}