# =map(int,input().split())
n=int(input())
a=list(map(int,input().split()))
ans=[0 for _ in range(8)]
cnt=0
res=0
for i in a:
    if 0<i<400:
        ans[0]+=1
    elif 400<=i<800:
        ans[1]+=1
    elif 800<=i<1200:
        ans[2]+=1
    elif 1200<=i<1600:
        ans[3]+=1
    elif 1600<=i<2000:
        ans[4]+=1
    elif 2000<=i<2400:
        ans[5]+=1
    elif 2400<=i<2800:
        ans[6]+=1
    elif 2800<=i<3200:
        ans[7]+=1
    elif 3200<=i:
        cnt+=1
for i in ans:
    if i==0:
        res+=1
x=8-res
if x+cnt<9:
    y=cnt+x
else:
    y=8
print(x,y)
# print(ans)
   