#include <iostream>
using namespace std;

void swap(int& a, int& b) {
	int x = a;
	a = b;
	b = x;
}

void mySort(int& a, int& b, int& c) {
	int min = 0;
	int mid = 0;
	int max = 0;

	max = a;
	mid = b;
	if(mid >= max)	swap(mid, max);
	min = c;
	if(min >= mid)	swap(min, mid);
	if(mid >= max)	swap(mid, max);
	a = min;
	b = mid;
	c = max;
}

int main(){
	int n;
	cin >> n;
	int a, b, c;
	for(int i = 0; i < n; ++i) {
		cin >> a >> b >> c;
		mySort(a, b, c);
		if(a * a + b * b == c * c) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}