#include<iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int around[3];
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> around[j];
		}
		for (int j = 0; j < 2; j++){
			for (int k = 0; k < 2; k++) {
				if (around[k] < around[k + 1])swap(around[k], around[k + 1]);
			}
		}
		if (around[0] * around[0] == around[1] * around[1] + around[2] * around[2])cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}