cl = [0,0,0,0,0,0,0,0]
def classify(rate):
    if rate <= 399:
        return 0
    elif rate <= 799:
        return 1
    elif rate <= 1199:
        return 2
    elif rate <= 1599:
        return 3
    elif rate <= 1999:
        return 4
    elif rate <= 2399:
        return 5
    elif rate <= 2799:
        return 6
    elif rate <= 3199:
        return 7
    else:
        return 8

N = int(input())
L=input().split(' ')
Lint = []
c8=0
for i in L:
    rate = classify(int(i))
    if rate == 8:
        c8+=1
    else:
        cl[rate] = 1
q=0
for i in cl:
    if i == 0:
        q += 1
Cmax=8 - max(q-c8,0)
if q == 8:
    if c8 == 0:
        Cmin = 0
    else:
        Cmin = 1
else:
    Cmin = 8 - q
print(str(Cmin) + ' ' + str(Cmax))