def inpl(): return [int(i) for i in input().split()]

H = set([])
N = int(input())
a = inpl()
sugoi = 0

for i in range(N):
    if a[i] < 400:
        H.add('gray')
    elif a[i] < 800:
        H.add('brown')
    elif a[i] < 1200:
        H.add('green')
    elif a[i] < 1600:
        H.add('sky')
    elif a[i] < 2000:
        H.add('blue')
    elif a[i] < 2400:
        H.add('yellow')
    elif a[i] < 2800:
        H.add('orange')
    elif a[i] < 3200:
        H.add('red')
    else:
        sugoi += 1

ans = [len(H),len(H)+sugoi]
print(*ans)