8. Solution is in the picture.