n = int(input())
a = list(map(int,input().split()))
a.sort()
b = [0]*8
over = 0

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

#bの中で、０ではない要素数をカウントする
low = 0
for i in b:
    if i >= 0:
        low += 1

if low == 0:
    mini = 1
else:
    mn = low
mx = c + over
print(mini,mx)
