#include<iostream>
#include<math.h>
using namespace std;
int N;
double a, b, c;

void rep(double* x,double* y){
	double d;
	d = *x;
	*x = *y;
	*y = d;
}

int main(){
	
	cin >> N;
	for(int i = 0; i < N; ++i){
		cin >> a >> b >> c;
		
		if(a < b || a < c){
			if(b < c){
				rep(&a, &c);
			}else{
				rep(&a, &b);
			}
		}

		if( a*a == b*b + c*c){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}


	}
	return 0;
}