#include<iostream>
using namespace std;
int righttriangle(int a,int b,int c){
	a*=a;b*=b;c*=c;
	if(a+b==c||b+c==a||a+c==b)return 1;
	else return 0;}
int main(){
	int n,a,b,c,i,j[1000];
	cin>>n;
	for(i=0;i<n;i++){
		cin>>a>>b>>c;
		j[i]=righttriangle(a,b,c);}
	for(i=0;i<n;i++){
		if(j[i])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;}
	return 0;}
