n=int(input())
a=list(map(int,input().split()))
col=[False]*8
ans=0
for i in a:
    if 1<=i<=399:
        col[0]=True
    elif i<=799:
        col[1]=True
    elif i<=1199:
        col[2]=True
    elif i<=1599:
        col[3]=True
    elif i<=1999:
        col[4]=True
    elif i<=2399:
        col[5]=True
    elif i<=2799:
        col[6]=True
    elif i<=3199:
        col[7]=True
    else:
        ans+=1
ans1=0
for i in col:
    if i:
        ans1+=1
print(max(ans1,ans),ans1+ans)