#include <iostream>
using namespace std;

int main(){
	int n;
	cin>>n;
	
	for(int i=0;i<n;i++){
		int data[3],tmp;
		cin>>data[0]>>data[1]>>data[2];
		
		for(int j=0;j<2;j++){
			if(data[j]>data[j+1]){
				tmp=data[j];
				data[j+1]=data[j];
				data[j]=tmp;
			}
		}
		if(data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}