import heapq

n = int(input())
hp = []
d = 1 << (n - 1)
for v in (d * int(s) for s in input().split()):
    heapq.heappush(hp, v)
for i in range(n - 1):
    x = heapq.heappop(hp)
    y = heapq.heappop(hp)
    print(x, y)
    heapq.heappush(hp, (x + y) / 2)
print('%.6f' % (hp[0] / d))
