N=int(input())
A=list(map(int,input().split(' ')))
A.sort()
count=0
s=0

for i in A:
    print(i)
    if 1<=i<400:
        count +=1
        i=400
        continue
    elif 400<=i<800:
        count +=1
        i=800
        continue
    elif 800<=i<1200:
        count +=1
        i=1200
        continue
    elif 1200<=i<1600:
        count +=1
        i=1600
        continue
    elif 1600<=i<2000:
        count +=1
        i=2000
        continue
    elif 2000<=i<2400:
        count +=1
        i=2400
        continue
    elif 2400<=i<2800:
        count +=1
        i=2800
        continue
    elif 2800<=i<3200:
        count +=1
        i=3200
        continue
    elif 3200<=i<=4800:
        count +=1
        s +=1
        continue
    else:
        break
ss=[int(count)-2, int(count+s)-2]

print(" ".join(map(str, ss)))