#include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int N=0;
  int a[10000]={0},b[10000]={0},c[10000]={0};
  cin>>N;
  for(int i=0;i<N;i++){
	cin>>a[i]>>b[i]>>c[i];
  }
  for(int i=0;i<N;i++){
	if(a[i]*a[i]==b[i]*b[i]+c[i]*c[i]||b[i]*b[i]==c[i]*c[i]+a[i]*a[i]||c[i]*c[i]==a[i]*a[i]+b[i]*b[i]){
     	cout<<"YES"<<endl;
     }
    else{
    	cout<<"NO"<<endl;
    }
  }
  return 0;
}