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

colors = [0] * 9

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

c_min = len(list(filter(lambda x: x != 0, colors[:8])))
c_max = min(c_min + colors[8], 8)

print(c_min, c_max)
