18. The base of a solid is the region in the first quadrant bounded by the y-axis and the graphs of \( y = \cos x \) and \( y = \sin x \), as shown in the figure above. If the cross sections of the solid perpendicular to the x-axis are squares, what is the volume of the solid?