n = int(input())
a = [int(input()) for i in range(n)]
a.sort()
r = 10**9
ans = [0, 0, 0, 0]
min_pair = [a[0], a[1]]
for i in range(2, n - 1):
    if max(a[i+1] - a[i], min_pair[1] - min_pair[0]) < r:
        ans = min_pair + [a[i], a[i+1]]
        r = max(a[i+1] - a[i], min_pair[1] - min_pair[0])
    if a[i] - a[i-1] < min_pair[1] - min_pair[0]:
        min_pair = [a[i-1], a[i]]
print(r)
print(*ans)
