5286

Problem ID: 5286

Since the sample input on ACM-ICPC Live Archive is wrong, the correct one has been uploaded on uDebug.