n=int(input())
a=list(map(int,input().split()))

ans=[0]*8
count=0
for i in range(n):
    if 8<=a[i]/400:
        count+=1
    else:
        ans[a[i]//400]=1

print(sum(ans),min(8,sum(ans)+count))

        
