n=int(input())
a=[i for i in list(map(int,input().split()))if i<3200]
p=len(a)
c=0
for j in range(8):
    b=[i for i in a if (j)*400<=i and i<(j+1)*400]
    if len(b)>0:
        c+=1
print(str(c)+" "+str(min(c+n-p,8))if c>n-p else str(c if c>0 else 1)+" "+str(min(8,n-p+1)))