n=int(input())
code=input().split()
a=[0]*8
i=0
k=0
for j in range(n):
    if int(code[j])<400:
        a[0]=1
    elif int(code[j])<800:
        a[1]=1
    elif int(code[j])<1200:
        a[2]=1
    elif int(code[j])<1600:
        a[3]=1
    elif int(code[j])<2000:
        a[4]=1
    elif int(code[j])<2400:
        a[5]=1
    elif int(code[j])<2800:
        a[6]=1
    elif int(code[j])<3200:
        a[7]=1
    else:
        i+=1
for z in range(8):
    k+=a[z]
print(k, min(8,i+k),sep=" ")