n=int(input())
a=list(map(int,input().split()))
l=[0]*9
for i in a:
    if i<400:
        l[0]=1
    elif 400<=i<800:
        l[1]=1
    elif 800<=i<1200:
        l[2]=1
    elif 1200<=i<1600:
        l[3]=1
    elif 1600<=i<2000:
        l[4]=1
    elif 2000<=i<2400:
        l[5]=1
    elif 2400<=i<2800:
        l[6]=1
    elif 2800<=i<3200:
        l[7]=1
    else:
        l[8]+=1

if sum(l)>=8:
    max_=8
else:
    max_=sum(l)
print(sum(l[:-1]),max_)