N=input()
a=list(map(int,input().split()))
j=range(400,3600,400)
c=[0]*8
r=0
for i in a:
    for k in range(8):
        if i>=3200:
            r+=1
            break
        if i<j[k]:
            c[k]+=1
            break
ans=8-c.count(0)
print(ans,ans+r)
