#include <stdlib.h>
#include <math.h>

#include <iostream>

int compare_int(const void* a, const void* b) {
    return * (int*) a - * (int*) b;
}

int ni(int tg) {
	return pow((double) tg, 2);
}

int main() {
	int n;
	std::cin >> n;

	for (int i = 1; i <= n; i++) {
		const int size = 3;
		int in[size];
		std::cin >> in[0] >> in[1] >> in[2];

		qsort(in, size, sizeof(int), compare_int);

		if (ni(in[0]) + ni(in[1]) == ni(in[2]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}