The base of a rectangular prism has an area of 24 square millimeters. The volume of the prism is 144 cubic millimeters. The shape is a cube. What is the height of the prism?