http://acm.nyist.net/JudgeOnline/problem.php?pid=8