How do the heart and lungs work together?