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

colors = [0 for _ in range(8)]
over = 0

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:
        over += 1

c = colors.count(1)
if over == 0:
    maxi = c
else:
    maxi = min(c + over, 8)

if c == 0:
    mini = 1
else:
    mini = c

print(mini, maxi)
