n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
c = [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] >= 8 * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+' '+str(max_c))