A cone and a hemisphere have equal bases and volumes. Find the ratio of their heights.