a = int(input())
b_list = list(map(int, input().split()))


c = a-1
d = 1//c
q = 1
for i in range(c):
    q = q * i+1
print(q)

f_list = []

for e in range(c):
    f_list.append(b_list[e+1])

g = sum(f_list)
g = g / c
h = g*q
print(h)