Solve problem 9