The volume of a rectangular prism varies jointly with the length and width of the figure when the height remains constant. The volume of a rectangular prism is 672 cubic centimeters. The figure has a length of 8 centimeters and a width of 14 centimeters. A second rectangular prism with the same height as the first prism has a length of 12 centimeters and a width of 8 centimeters. What is the volume of the second prism?