#include <iostream>

using namespace std;

bool CheckRightTriangle(int a,int b,int c);
int main(){
	int *a,*b,*c,datanum;
	cin>>datanum;
	a = new int[datanum];
	b = new int[datanum];
	c = new int[datanum];
	for( int i=0;i<datanum;i++ ){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=0;i<datanum;i++){
		if(CheckRightTriangle(a[i],b[i],c[i])){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	delete[] a;
	delete[] b;
	delete[] c;
	return 0;
}

bool CheckRightTriangle(int a,int b,int c){
	if( a*a+b*b==c*c ) return true;
	if( c*c+a*a==b*b ) return true;
	if( b*b+c*c==a*a ) return true;
	return false;
}