5450

Problem ID: 5450

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