
N = int(input())

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

color = [0] * 9

a = 400 
flag = 1
    
for i in range(0,N):
    if 8*a <= rate[i]:
        color[8] += 1
    else:
        flag = 0
        if rate[i] < a:
            color[0] = 1
        elif a <= rate[i] < 2*a:
            color[1] = 1
        elif 2*a <= rate[i] < 3*a:
            color[2] = 1
        elif 3*a <= rate[i] < 4*a:
            color[3] = 1
        elif 4*a <= rate[i] < 5*a:
            color[4] = 1
        elif 5*a <= rate[i] < 6*a:
            color[5] = 1
        elif 6*a <= rate[i] < 7*a:
            color[6] = 1
        elif 7*a <= rate[i] < 8*a:
            color[7] = 1

min_color = 0
max_color = 0

if flag == 1:
    min_color = color[8]
else:
    min_color = color.count(1)

max_color = min_color + color[8]

if max_color >= 8:
    max_color = 8
else:
    pass    

print(min_color,max_color)