#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n,i,j,a[3],x,y,z;
	cin>>n;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
	cin>>a[j];
	x=a[2]*a[2];
	y=a[1]*a[1];
	z=a[0]*a[0];
		}
		sort(a,a+3);
		if(x==y+z){
		cout<<"YES"<<endl;
		}
		else{
		cout<<"NO"<<endl;
		}
	}
return 0;
}
