inf=float('inf')
N = int(input())
x = list(map(int, input().split()))
a=[0]*8
b=0
for i in range(0,N):
    if x[i]>=3200:
        b +=1
for j in range(0,8):
    for i in range(0,N):
        if x[i]<400:
            a[j] +=1
            x[i] = inf
        x[i] -= 400

zerox=0
mincolar=0
print(b,a)
for i in a:
    if i==0:
        zerox +=1  
    else:
        mincolar +=1

print(mincolar,mincolar+b)


quit()
