N = int(input())
A = list(map(int, input().split()))

colors = [0 for _ in range(9)]

for a in A:
    if 1 <= a < 400:
        colors[0] = 1
    if 400 <= a < 800:
        colors[1] = 1
    if 800 <= a < 1200:
        colors[2] = 1
    if 1200 <= a < 1600:
        colors[3] = 1
    if 1600 <= a < 2000:
        colors[4] = 1
    if 2000 <= a < 2400:
        colors[5] = 1
    if 2400 <= a < 2800:
        colors[6] = 1
    if 2800 <= a < 3200:
        colors[7] = 1
    if 3200 <= a:
        colors[8] += 1

minimum = colors[:-1].count(1)
if minimum == 0:
    minimum += 1
    colors[8] -= 1

maximum = minimum
if colors[-1] != 0:
    zero_count = colors.count(0)
    over_count = colors[-1]
    maximum += min(zero_count, over_count)
    maximum = min(maximum, 8)

print(minimum, maximum)
