N = int(input())
a = list(map(int, input().split()))
color = [0 for i in range(9)]

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

count = 8 - color[:8].count(0)
print(max(count,1), '', end='')
count += color[8]
if count > 8:
    print(8)
else:
    print(count)