Raymond used 36 cubes to build the first layer of a rectangular prism. The edge length of each cube was 1 inch. The finished prism had a total of 8 layers. What is the volume of Raymond's prism in cubic inches?