#include <iostream>
#include <string>
#include <sstream>
#include <math.h>
using namespace std;

int main(){
	int N;
	cin >> N;
	string line;
	cout << endl;
	for (int i = 0; i < N; i++){
		getline(cin, line);
		stringstream lineStream(line);
		int a, b, c;
		lineStream >> a >> b >> c;
		int a_two = pow(a, 2);
		int b_two = pow(b, 2);
		int c_two = pow(c, 2);
		if ((a_two + b_two == c_two) || (b_two + c_two == a_two) || (c_two + a_two == b_two)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
    return 0;
}