#include <iostream>
using namespace std;

void solve(int a,int b, int c){
	a*=a; b*=b; c*=c;
	if(a+b==c) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}

int main() {
	int a,b,c,N;
	cin>>N;
	for(;N>0;N--){
		cin>>a>>b>>c;
		if(a<c && b<c) solve(a,b,c);
		else if(a<b && c<b) solve(a,c,b);
		else solve(b,c,a);
	}
	return 0;
}