n=int(input())
a=list(map(int,input().split()))
b=[0]*8
free=0
for i in a:
    if i<400:
        b[0]+=1
    elif i<800:
        b[1]+=1
    elif i<1200:
        b[2]+=1
    elif i<1600:
        b[3]+=1
    elif i<2000:
        b[4]+=1
    elif i<2400:
        b[5]+=1
    elif i<2800:
        b[6]+=1
    elif i<3200:
        b[7]+=1
    else:
        free+=1
min_color=8-b.count(0)
max_color=min_color+free
print("{} {}".format(min_color,max_color))
