Unitary solutions of the pentagon and hexagon equations