Adding problem 8.

Solved problem 8.