n = int(input())
array = [int(item) for item in input().split()][:n]
print(array)
colors = [0, 0, 0, 0, 0, 0, 0, 0, 0]
for rate in array:
    if rate > 0 and 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
    elif rate <= 4800:
        colors[8] += 1

count = 0
count += 1 if colors[0] > 0 else 0
count += 1 if colors[1] > 0 else 0
count += 1 if colors[2] > 0 else 0
count += 1 if colors[3] > 0 else 0
count += 1 if colors[4] > 0 else 0
count += 1 if colors[5] > 0 else 0
count += 1 if colors[6] > 0 else 0
count += 1 if colors[7] > 0 else 0
min = count if count > 0 else 1
count += colors[8]
max = count

print("{} {}".format(min, max))
