Saturated water vapor in a closed system is condensed by cooling it at constant pressure to a saturated liquid at 40 kPa. Determine the heat transferred and the work done respectively during this process, in kJ/kg.