#include <iostream>
int main(void){
	int n,a,b,c,d;
	std::cin>>n;
	while(n--){
		std::cin>>a>>b>>c;
		if (a>b){d=a;a=b;b=d;};
		if (b>c){d=b;b=c;c=d;};
		std::cout<<(a*a+b*b==c*c?"YES\n":"NO\n");
	}
}