n=int(input())
A=list(map(int,input().split()))

color=[0 for i in range(8)]
upper=0

for a in A:
    if 1<=a<=399:
        color[0]=1
    elif 400<=a<=799:
        color[1]=1
    elif 800<=a<=1199:
        color[2]=1
    elif 1200<=a<=1599:
        color[3]=1
    elif 1600<=a<=1999:
        color[4]=1
    elif 2000<=a<=2399:
        color[5]=1
    elif 2400<=a<=2799:
        color[6]=1
    elif 2800<=a<=3199:
        color[7]=1
    else:
        upper+=1

mn=sum(color)
mx=sum(color)+upper
print(mn,mx)
