N=int(input())
a=[int(i) for i in input(). split ()]
b=[]
for i in range(9):
    b.append(0)
for i in range (N):
    if a[i]>=3200:
        b[8]+=1
    else:
        j=a[i]//400
        b[j]+=1
i=0
mi=0
while i<8:
    mi+=b[i]
    i+=1
ma=mi
if b[8]>0:
    ma+=b[8]
if b[8]>8:
    ma=8
print (mi+" "+ma)