1. In a certain regular square pyramid, all of the edges have length \(12\). Find the volume of the pyramid.
2. A rectangular prism has a total surface area of \(48.\) Also, the sum of all the edges of the prism is \(40.\) Find the length of the diagonal joining one corner of the prism to the opposite corner.