#include <iostream>
using namespace std;

int main(){
	const int N = 3;
	int l[N];
	int n;
	cin >> n;
	for(int i = 0; i < n; ++i) {
		cin >> l[0] >> l[1] >> l[2];
		sort(l, l + N);
		if(l[0] * l[0] + l[1] * l[1] == l[2] * l[2]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}