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

minans=0
maxans=0
miniro=[0]*8
maxiro=[0]*8
count=0

for i in range(n):
    for j in range(8):
        a[i]-=400
        if a[i]<0:
            miniro[j]+=1
            break
        if j==7:
            count+=1

for i in range(8):
    if miniro[i]>0:
        minans+=1
        maxans+=1
    if count>0 and miniro[i]==0:
        count-=1
        maxans+=1


print("{0} {1}".format(minans, maxans))