#include<iostream>
using namespace std;

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