N = int(input())
colors = [False]*8
high_rate_count = 0
for num in input().split():
    rate = int(int(num)/400)
    if rate > 7:
        high_rate_count += 1
    else:
        colors[rate] = True
count = 0
for color in colors:
    if color:
        count += 1
if count == 0:
    count = 1
    high_rate_count -= 1
max_count = count + high_rate_count
if max_count > 8:
    max_count = 8
print(count, max_count)