A pair of balaclava-clad attackers tried to rob a man demanding money after one hit him over the back of the head in Hartlepool, police said.