#include<stdio.h>
#include<iostream>

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;

		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			hen2=0;
		}
		else if(saidai<hen3){
			saidai=hen3;
			hen3=0;
		}
		else if(saidai==hen1)
			hen1=0;
		if(saidai*saidai==hen1*hen1+hen2*hen2+hen3*hen3)
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}