Solution to problem 8.
Solution to problem 9.