#include<iostream>
#include<queue>
using namespace std;

#define F(I,J,N) for(int I=J;I<N;I++)

int main(){
	priority_queue<int> q;
	int n,a,b,c;
	cin>>n;
	F(i,0,n){
		cin>>a>>b>>c;
		q.push(a);q.push(b);q.push(c);
		a=q.top();q.pop();b=q.top();q.pop();c=q.top();q.pop();
		bool f=false;
		if(a*a==(b*b+c*c)) f=true;
		if(f) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}