Solves Problem 61.