The question and detail is below