n = int(input())
al = list(map(int, input().split()))
count = [0] * 8
overred = 0

for a in al:
    if a < 400:
        count[0] += 1
    elif a < 800:
        count[1] += 1
    elif a < 1200:
        count[2] += 1
    elif a < 1600:
        count[3] += 1
    elif a < 2000:
        count[4] += 1
    elif a < 2400:
        count[5] += 1
    elif a < 2800:
        count[6] += 1
    elif a < 3200:
        count[7] += 1
    else:
        overred += 1

color = 8 - count.count(0)

if color != 0:
    color_min = color
    color_max = color_min + min(8 - color_min, overred)
else:
    color_min = 1
    color_max = min(8, overred)

print(color_min, color_max)