Problem 2 Solution