Code for problem 52A.
Code for problem 66C.