# =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 range(n):
    if 0<a[i]<400:
        ans[0]+=1
    elif 400<=a[i]<800:
        ans[1]+=1
    elif 800<=a[i]<1200:
        ans[2]+=1
    elif 1200<=a[i]<1600:
        ans[3]+=1
    elif 1600<=a[i]<2000:
        ans[4]+=1
    elif 2000<=a[i]<2400:
        ans[5]+=1
    elif 2400<=a[i]<2800:
        ans[6]+=1
    elif 2800<=a[i]<3200:
        ans[7]+=1
    elif 3200<=a[i]:
        cnt+=1
for i in ans:
    if i==0:
        res+=1
x=8-res
if x+cnt<9:
    y=cnt+x
else:
    y=x
print(x,y)
   