#ABC064C
N = int(input())
ai = list(map(int, input().split()))
hai = 0
tya = 0
mido = 0
mizu = 0
ao = 0
ki = 0
ore = 0
aka = 0
kinds = 0
for a in ai:
    if a < 400:
        hai = 1
    elif a < 800:
        tya = 1
    elif a < 1200:
        mido = 1
    elif a < 1600:
        mizu = 1
    elif a < 2000:
        ao = 1
    elif a < 2400:
        ki = 1
    elif a < 2800:
        ore = 1    
    else:
        aka +=1
colors = [hai,tya,mido,mizu,ao,ki,ore]
for color in colors:
    if color == 1:
        kinds += 1
min_n = kinds
if aka > kinds:
    min_n = kinds + 1
max_n = 0
no_color = 7-kinds
if no_color >= aka:
    max_n += kinds + aka
else:
    max_n = 8
print(str(min_n) + " " + str(max_n))


