n=int(input())
l=[int(i) for i in input().split()]
c=[0]*8 
ind=0 
for i in l:
    if 1<=i<=399:
        c[0]+=1 
    if 400<=i<=799:
        c[1]+=1 
    if 800<=i<=1199:
        c[2]+=1 
    if 1200<=i<=1599:
        c[3]+=1 
    if 1600<=i<=1999:
        c[4]+=1 
    if 2000<=i<=2399:
        c[5]+=1 
    if 2400<=i<=2799:
        c[6]+=1 
    if 2800<=i<=3199:
        c[7]+=1 
    if i>=3200:
        ind+=1 
s=sum(i>0 for i in c)
s+=ind 
print(s,min(s+ind,n))