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

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

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

# print(miniro)
minans=max(sum(miniro),1)

print("{0} {1}".format(minans, min(count+minans, 8)))