Calculate the volume of a pyramid and cone