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

using namespace std;

int main()
{
	int s[3], n;

	cin >> n;

	for (int i = 0; i < n; i++){
		for (int j = 0; j < 3; j++){
			cin >> s[j];
		}
		sort(s, s + 3);

		if (pow(s[0], 2) + pow(s[1], 2) == pow(s[2], 2)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return (0);
}