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

b = [0]*8
over = 0

for i in range(n):
    if a[i] >= 3200:
        over += 1
    elif 1 <= a[i] <= 399:
        b[0] += 1
    elif 400 <= a[i] <= 799:
        b[1] += 1
    elif 800 <= a[i] <= 1199:
        b[2] += 1
    elif 1200 <= a[i] <= 1599:
        b[3] += 1
    elif 1600 <= a[i] <= 1999:
        b[4] += 1
    elif 2000 <= a[i] <= 2399:
        b[5] += 1
    elif 2400 <= a[i] <= 2799:
        b[6] += 1
    elif 2800 <= a[i] <= 3199:
        b[7] += 1

#bの中で、０ではない要素数をカウントする
low = 0
for i in range(8):
    if b[i] == 0:
        pass
    else:
        low += 1

if over == 0:
    print(low,low)
else:
    if low == 0:
        if over < 8:
            print(1,over)
        else:
            print(1,8)
    else:
        if over < 8 - low:
            print(low,low + over)
        else:
            print(low,8)
