#include <cstdio>

int main(){
	int n;
	int a[3];
	scanf("%d",&n);

	for (int i=0;i<n;++i){
		for (int j=0;j<3;++j) scanf("%d",a+j);
		bool z=false;
		for (int k=0;k<3;++k)
			if (a[k]*a[k]+a[(k+1)%3]*a[(k+1)%3]==a[(k+2)%3]*a[(k+2)%3])
				z=true;
		if (z) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}