
N=int(input())
a=list(map(int,input().split()))

color=[0 for i in range(7)]
free=0

for rate in a:
    if(rate<=399):
        color[0]+=1
    elif(rate<=799):
        color[1]+=1
    elif(rate<=1599):
        color[2]+=1
    elif(rate<=1999):
        color[3]+=1
    elif(rate<=2399):
        color[4]+=1
    elif(rate<=2799):
        color[5]+=1
    elif(rate<=3199):
        color[6]+=1
    else:
        free+=1


ans=len([i for i in color if i != 0])

print(ans,ans+free)


