A triangular prism has an isosceles right triangular base with a hypotenuse of 32 and a prism height of 12. A square prism has a height of 12 and its volume is equal to that of the rectangular prism. What are the dimensions of the square base, in simplest radical form?