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

using namespace std;

int pitagoras(int a,int b,int c){
	if(pow(a,2)+pow(b,2) == pow(c,2))
		return 1;
	if(pow(b,2)+pow(c,2) == pow(a,2))
		return 1;
	if(pow(c,2)+pow(a,2) == pow(b,2))
		return 1;
	return 0;
}
int main(){
	int num,i;
	int a[1000],b[1000],c[1000];
	cin >> num;
	for(i = 0; i < num; i++)
		cin >> a[i] >> b[i] >> c[i];
		for(i = 0; i < num; i++){
			if(pitagoras(a[i],b[i],c[i])==1)
				cout << "YES" << endl;
			if(pitagoras(a[i],b[i],c[i])==0)
				cout << "NO"  << endl;
		}
}
	