N = int(input())
*A, = map(int, input().split())
colors = [False] * 8
any = 0

for a in A:
    if 1 <= a < 300:
        colors[0] = True
        break
    if 300 <= a < 800:
        colors[1] = True
        break
    if 800 <= a < 1200:
        colors[2] = True
        break
    if 1200 <= a < 1600:
        colors[3] = True
        break
    if 1600 <= a < 2000:
        colors[4] = True
        break
    if 2000 <= a < 2400:
        colors[5] = True
        break
    if 2400 <= a < 2800:
        colors[6] = True
        break
    if 2800 <= a < 3200:
        colors[7] = True
        break
    if 3200 <= a:
        any += 1

print(colors.count(True), end=" ")

for _ in range(any):
    try:
        i = colors.index(False)
        colors[i] = True
    except Exception:
        break

print(colors.count(True))
