import sys
from typing import Any


def tsmallest(r: object) -> Any:
    t1 = min(r)
    a.pop(a.index(min(r)))
    t2 = min(r)
    return t2-t1
n = int(sys.stdin.readline())
a = list(map(int, input().split()))
m=str(a[0]), str(a[1]), str(a[2])
s=" ".join(m)


print(tsmallest((a)))
print(s)
