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

color = [0] * 8
ans = 0

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

print(sum(color), sum(color) + ans)