#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int p=0;p<n;p++){
		int a,b,c,d;
		cin>>a>>b>>c;
		if(c<a){
			d=c;
			c=a;
			a=d;
		}
		if(c<b){
			d=c;
			c=b;
			b=d;
		}
		int aa=a*a,bb=b*b,cc=c*c;
		if(aa+bb==cc){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
}
