n = int(input())

colors = list(map(int,input().split()))

col_n = [0]*9

for c in colors:
    if c >= 1 and c <= 399:
        col_n[0] += 1
    elif c >= 400 and c <= 799:
        col_n[1] += 1
    elif c >= 800 and c <= 1199:
        col_n[2] += 1
    elif c >= 1200 and c <= 1599:
        col_n[3] += 1
    elif c >= 1600 and c <= 1999:
        col_n[4] += 1
    elif c >= 2000 and c <= 2399:
        col_n[5] += 1
    elif c >= 2400 and c <= 2799:
        col_n[6] += 1
    elif c >= 2800 and c <= 3199:
        col_n[7] += 1
    else:
        col_n[8] += 1

if col_n[8] == 0:
    print(8-col_n[:8].count(0),8-col_n[:8].count(0))

else:
    if 8-col_n[:8].count(0) >= col_n[8]:
        print(8-col_n[:8].count(0),(8-col_n[:8].count(0)+col_n[8]))
    
    else:
        print(col[8],(8-col_n[:8].count(0))+col_n[8])
