A bar of soap is shaped like a right rectangular prism. The base is a rectangle that is 12 centimeters by 2 centimeters. The height is 3 centimeters. A second bar of soap is shaped like a square pyramid with the same volume as the first bar of soap. Each side of the base of the pyramid is 6 centimeters in length. What is the height of the pyramid?