N=int(input())
A=[int(x)for x in input().split()]
array=[0]*9
def wake(x):
    if x<400:
        array[0]+=1
    elif x<800:
        array[1]+=1
    elif x<1200:
        array[2]+=1
    elif x<1600:
        array[3]+=1
    elif x<2000:
        array[4]+=1
    elif x<2400:
        array[5]+=1
    elif x<2800:
        array[6]+=1
    elif x<3200:
        array[7]+=1
    else:
        array[8]+=1
    return
for i in A:
    wake(i)
ans1=8-array.count(0)
ans=8-array.count(0)
if array[8]==0:
    ans+=1
    ans1+=1
else:
    for j in range(8):
        if array[j]==0:
            array[j]+=1
            array[8]-=1
            ans+=1
        if array[8]==0:
            break


print(ans1,ans)

    
    
        