#include <iostream>
#include <math.h>

using namespace std;

bool judge_triangle(double a,double b,double c){
	double d=sqrt(pow(a,2.0)+pow(b,2.0));
	if(d==c) return true;
	else return false;
}

int main(void){
	int i,count;
	double a,b,c;

	cin>>count;

	for(i=0;i<count;i++){
		cin>>a>>b>>c;
		if(judge_triangle(a,b,c)) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}