测试

Time Limit: 20000 ms Memory Limit: 500000 KiB

Problem Description

Input

Output

Sample Input

Sample Output

Hint

Source