N = int(input())
A = list(map(int,input().split()))
over = 0
M = [0 for _ in range(8)]
for a in A:
    if 1 <= a <= 399:
        M[0] = 1
    elif 400 <= a <= 799:
        M[1] = 1
    elif 800 <= a <= 1199:
        M[2] = 1
    elif 1200 <= a <= 1599:
        M[3] = 1
    elif 1600 <= a <= 1999:
        M[4] = 1
    elif 2000 <= a <= 2399:
        M[5] = 1
    elif 2400 <= a <= 2799:
        M[6] = 1
    elif 2800 <= a <= 3199:
        M[7] = 1
    elif 3200 <= a:
        over += 1
count = sum(M)
if count == 0:
    print(str(1)+' '+str(min(over,8)))
else:
    print(str(count)+' '+str(count+min(over,8-count)))