Did problem 8. (Skipping problem 7 because it looks boring.)
Did problem 9