#include<iostream>

/*三平方の定理*/
int main() {
	int N,array[3];
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std:: cin >> array[0] >> array[1] >> array[2];
		for (int l = 0; l < 2; l++) {
			if (array[l] >= array[l + 1]) {
				int tmp;
				tmp = array[l];
				array[l] = array[l + 1];
				array[l + 1] = tmp;
			}
		}
		if (array[2] * array[2] == array[0] * array[0] + array[1] * array[1]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}
}

