#include <iostream>
#include <iostream>
#include <stack>
using namespace std;

int main(){
	int a[1000];
	int b[1000];
	int c[1000];
	int n , m;

	cin >> n;
	m = 0;

	for (int i = 0; i < n; i++){
		cin >> a[i];
		cin >> b[i];
		cin >> c[i];

		if (a[i] > b[i]){
			m = a[i];
			a[i] = b[i];
			b[i] = m;
		}
		if (b[i] > c[i]){
			m = b[i];
			b[i] = c[i];
			c[i] = m;
		}
	}

	for (int i = 0; i < n; i++){
		if (a[i] * a[i] + b[i] * b[i] == c[i] * c[i]){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}
