Zoya runs the lighthouse at the steppe camp of Horselord Plains. Today the books show a list of ledgers, and the numbers must be worked out before sundown. Task: Among all pairs of distinct elements, print the pair sum that is closest to k. If several tie, print the smaller sum. Input format: First line: n and k. Second line: n integers. Output format: Print the closest achievable pair sum. Constraints: 2 <= n <= 3874; -1000000000 <= a[i],k <= 1000000000.
Example 1:
Example 2:
Example 3:
Constraints:
2 <= n <= 3874; -1000000000 <= a[i],k <= 1000000000.
