#include<iostream>
using namespace std;
int main(){
	int n=0;cin>>n;
	int a[n]={0},b[n]={0},c[n]={0};
	long long p[n]={0};
	for(int i=0;i<n;i++){
		cin>>a[i]>>b[i]>>c[i];
		p[i]=(a[i]*a[i]+b[i]*b[i]-c[i]*c[i])*(b[i]*b[i]+c[i]*c[i]-a[i]*a[i])*(c[i]*c[i]+a[i]*a[i]-b[i]*b[i]);
		if(p[i]==0){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
	}
	return 0;
}
	