#include<iostream>
using namespace std;

class Triangle{
public:
	int roop, a, b, c;
	void get();
	int triangle(int, int, int);
};

void Triangle::get(){
	cin >> a >> b >> c;
}

int Triangle::triangle(const int, const int, const int){
	if ((a*a + b*b == c*c) || (a*a + c*c == b*b) || (b*b + c*c == a*a)){
		return (1);
	}
	else{
		return (2);
	}
}

int main(){
	Triangle TR;

	int i, *flag;
	cin >> TR.roop;
	flag = new int[TR.roop];
	for (i = 0; i < TR.roop; i++){
		TR.get();
		flag[i] = TR.triangle(TR.a, TR.b, TR.c);
	}
	for (i = 0; i < TR.roop; i++){
		if (flag[i] == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}

	return (0);
}
