#include<iostream>

using namespace std;

int main(){

	int num,i,j;
	
	cout << "the number of data set: ";
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		do{
			cin >> a[i] >> b[i] >> c[i];
		}while((a[i]<0||a[i]>1000)&&(b[i]<0||b[i]>1000)&&(c[i]<0||c[i]>1000));
	}
	
	int triangle[3];
	for(i=0;i<num;i++){
		triangle[0] = a[i];
		triangle[1] = b[i];
		triangle[2] = c[i];
		
		int max,max_num;
		max = triangle[0];
		max_num = 0;
		for(j=0;j<3;j++){
			if(max<triangle[j]){
				max = triangle[j];
				max_num = j;
			}
		}
		switch(max_num){
			case(0):if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i]) cout << "YES\n";
					else cout << "NO\n";
					break;
			case(1):if(b[i]*b[i] == a[i]*a[i] + c[i]*c[i]) cout << "NO\n";
					else cout << "NO\n";
					break;
			case(2):if(c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) cout << "YES\n";
					else cout << "NO\n";
					break;
			default:break;
		}
	}
	
	return 0;
}