One layer of a rectangular prism is 4 centimeters long and 2 centimeters wide. How many layers are needed to make a rectangular prism with a volume of 24 cubic centimeters?