#include <iostream>
using namespace std;

int main(){

	int n;
	int sd[3];
	int max,m=-1;
	bool isRect=false;

	cin>>n;

	for(int i=0;i<n;++i){
		cin>>sd[0]>>sd[1]>>sd[2];
		//長辺の判定
		max=0;
		for(int i=0;i<3;++i){
			if(sd[i]>max){m=i;}
		}

		//直角三角形の判定
		switch(m){
		case 0:
			isRect = (sd[0]*sd[0] == (sd[1]*sd[1] + sd[2]*sd[2])) ? true:false;
			break;
		case 1:
			isRect = (sd[1]*sd[1] == (sd[0]*sd[0] + sd[2]*sd[2])) ? true:false;
			break;
		case 2:
			isRect = (sd[2]*sd[2] == (sd[0]*sd[0] + sd[1]*sd[1])) ? true:false;
			break;
		}

		if(isRect){cout<<"YES\n";}else{cout<<"NO\n";}
//		cout<<(isRect==true)?"YES":"NO"<<"\n";

	}
}