Adding problem 9.

Solved problem 9.