#include <iostream>
using namespace std;

int main() {
int a,b,c,i,x=a*a,y=b*b,z=c*c;
cin>>i;
for(int n=1; n<=i; n++){
cin>>a>>b>>c;


if(x+y==z||x+z==y||y+z==x) {cout<<"YES";}
else{cout<<"NO";}	
}

// your code goes here
	return 0;
}