#include<iostream>
using namespace std;
int main() {
	int x,y,n, i, j,a[10000],b[10000],c[10000];
	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x = a[i] * a[i] + b[i] * b[i];
		y = c[i] * c[i];
		if (x == y) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	
	
	return 0;
}