
N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)

