#include <iostream>
using namespace std;

template <typename T>
bool isRight_Triangle ( T a, T b, T c )
{
	return (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
}

int main() {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; ++i) {
			int a, b, c;
			cin >> a >> b >> c;

			if (isRight_Triangle(a, b, c)) {
				cout << "YES" << endl;
			}
			else {
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}