import math

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n, m = (int(xi) for xi in input().split())

a = []
diff = 0
a0 = 0
a1 = 0
for xi in range(m):
    a0 = a1
    a1 = int(input())
    a.append(a1)
    if a1-a0>diff :
        diff=a1-a0

print(comb(n,diff))
print(diff)
print(a)

p = [1]
for xi in range(1,diff+1):
    add = 1
    for j in range(1, int(xi/2)):
        add += comb(xi-j,j)
    p.append(add)
