N = int(input())
V = [int(s) for s in input().split(" ")]
V_sort = sorted(V)

sumV = 0
for i,x in enumerate(V_sort):
    p = max(0,i-1)
    sumV += x*(2**p)
    print(p,sumV)
res = sumV/2**(N-1)
print(res)