【POJ】[1308]

Description

Input

Output

Sample Input

Sample Output