n = int(input())
s = [ int(i) for i in input().split() ]
cols = [ 0 for i in range(8) ]
col2 = [ 0 for i in range(8) ]
for i in s:
    if i <= 399:
        cols[0] = True
        col2[0] = True
    elif 400<= i <= 799:
        cols[1] = True
        col2[1] = True
    elif 800 <= i <= 1199:
        cols[2] = True
        col2[2] = True
    elif 1200<= i <= 1599:
        cols[3] = True
        col2[3] = True
    elif 1600 <= i <= 1999:
        cols[4] = True
        col2[4] = True
    elif 2000 <= i <= 2399:
        cols[5] = True
        col2[5] = True
    elif 2400 <= i <= 2799:
        cols[6] = True
        col2[6] = True
    elif 2800 <= i <= 3199:
        cols[7] = True
        col2[7] = True
    else:
        for j in range(8):
            if col2[j] == False:
                col2[j] = True
                break

print(sum(cols),sum(col2))                                               
