#include using namespace std; int main(){ vector A(5); cin>>A[0]>>A[1]>>A[2]>>A[3]>>A[4]; sort(A.begin(),A.end()); if(A[0]==A[4]){ cout<<"NO HAND"<