Solve Problem 18.