# -*- coding: utf-8 -*-

## Library

import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter

## input

# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]


N = int(input())
V = list(map(int, input().split()))

V.sort()
tmp = (V[0]+V[1])/2
for i in range(2,N):
    print(i,tmp)
    tmp = (tmp + V[i])/2

print(tmp)