N=int(raw_input())
a=map(int,raw_input().split(' '))

color=[0]*8
free=0

for ai in a:
    if ai<400:
        color[0]+=1
    elif ai<800:
        color[1]+=1
    elif ai<1200:
        color[2]+=1
    elif ai<1600:
        color[3]+=1
    elif ai<2000:
        color[4]+=1
    elif ai<2400:
        color[5]+=1
    elif ai<2800:
        color[6]+=1
    elif ai<3200:
        color[7]+=1
    else:
        free+=1

c=len(color)-color.count(0)

m=c+free
if m>8:
    m=8

print c,m
