See the attached image for the question