#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int n,a[3],i,j,k,box;
	cin>>n;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++)cin>>a[j];
		for(j=0;j<2;j++){
			for(k=j+1;k<3;k++){
				if(a[j]<a[k]){
					box=a[j];
					a[j]=a[k];
					a[k]=box;
				}
			}
		}if(a[0]*a[0]==(a[1]*a[1])+(a[2]*a[2]))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}