N = int(input())
a_list = list(map(int, input().split()))

def rate_color(rate):
    if 1 <= rate and rate < 400:
        return 'ash'
    elif 400 <= rate and rate < 800:
        return 'brown'
    elif 800 <= rate and rate < 1200:
        return 'green'
    elif 1200 <= rate and rate < 1600:
        return 'lightblue'
    elif 1600 <= rate and rate < 2000:
        return 'blue'
    elif 2000 <= rate and rate < 2400:
        return 'yellow'
    elif 2400 <= rate and rate < 2800:
        return 'orange'
    elif 2800 <= rate and rate < 3200:
        return 'red'
    else:
        return 'anycolor'


color_list = []
for i in range(N):
    color_list.append(rate_color(a_list[i]))


basic_color_list = ['ash', 'brown', 'green', 'lightblue', 'blue', 'yellow', 'orange', 'red', 'anycolor']

count_list = []
for _ in basic_color_list:
    count_list.append(color_list.count(_))

count_list_but_anycolor = count_list[:-1]

count_anycolor = count_list[-1]
count_0 = count_list_but_anycolor.count(0)

max_result = 8 - count_0 + count_anycolor
min_result = 8 - count_0

print(min_result, max_result)
