Problem 31: Algebraic Manipulation