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

int main() {
	int N;
	cin >> N;
	vector<int> a(3);
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> a[j];
			a[j] = pow((double)a[j], 2);
		}
		sort(a.begin(), a.end());			
		if (a[0] + a[1] == a[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
		for (int j = 0; j < 3; j++) {
			a[j] = 0;
		}
	}
	return 0;
}