#include<iostream>

using namespace std;

int main(void)
{
	int a[1000],b[1000],c[1000],size;
	cin>>size;
	for(int i=0;i<size;i++){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=0;i<size;i++){
		if(
			a[i]*a[i]+b[i]*b[i]==c[i]*c[i]||
			a[i]*a[i]+c[i]*c[i]==b[i]*b[i]||
			b[i]*b[i]+c[i]*c[i]==a[i]*a[i]
			){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
}