//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	cin.tie(0);ios::sync_with_stdio(false);
	int n; cin >> n;
	for (int i = 0; i < n;i++) {
		int d[3]; for (int i = 0; i < 3; i++) cin >> d[i];
		sort(d, d + 3);
		if (d[0] * d[0] + d[1] * d[1] == d[2] * d[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}