WA on test #5.
WA on test #7.
Code for problem 53B.