#include <iostream>
using namespace std;

int main(){
	int n;
	int l[3];
	int ma, sum, rest, ma2;
	cin >> n;

	for(int i=0; i<n; ++i){
		cin >> l[0] >> l[1] >> l[2];
		ma = max(l[0], max(l[1],l[2]));
		ma2 = ma*ma;
		sum = l[0]*l[0] + l[1]*l[1] + l[2]*l[2];
		rest = sum - ma2;

		if(ma2 == rest){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}


	delete[] l;
	return 0;
}