How are the inputs and outputs of photosynthesis and respiration related to one another?