N = int(input())
rates = list(map(int, input().split(' ')))
colors = [0] * 9 # colors[8] = anything
for r in rates:
    if r < 400: colors[0] += 1
    elif r < 800: colors[1] += 1
    elif r < 1200: colors[2] += 1
    elif r < 1600: colors[3] += 1
    elif r < 2000: colors[4] += 1
    elif r < 2400: colors[5] += 1
    elif r < 2800: colors[6] += 1
    elif r < 3200: colors[7] += 1
    else: colors[8] += 1
color_max = 0
color_min = 0
zeros = colors.count(0)
if colors[8] == 0:
    color_max = 9 - zeros
    color_min = color_max
else:
    color_min = 8 - zeros
    if zeros <= colors[8]:
        color_max = 8
    else:
        color_max = 8 - zeros + colors[8]
print(color_min, color_max)