N = int(input())

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

color = []
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 color[8] == 0:
    min_color = 9 - color.count(0)
    max_color = min_color
else:
    if flag == 1:
        min_color = 1
        if color[8] >= 8:
            max_color = 8
        else:
            max_color = color[8]
    else:
        min_color = 8 - color.count(0)
        if min_color + color[8] >= 8:
            max_color = 8
        else:
            max_color = min_color + color[8]
            
            
print(min_color,max_color)