N = int(input())
a = list(map(int, input(). split()))
count = 0

gray = [i for i in a if i < 400]
brown = [i for i in a if 400 <= i < 800]
green = [i for i in a if 800 <= i < 1200]
lblue = [i for i in a if 1200 <= i < 1600]
blue = [i for i in a if 1600 <= i < 2000]
yellow = [i for i in a if 2000 <= i < 2400]
orange = [i for i in a if 2400 <= i < 2800]
red = [i for i in a if 2800 <= i < 3200]
rainbow = [i for i in a if 3200 <= i]

color = [gray, brown, green, lblue, blue, yellow, orange, red]

for i in color:
    if len(i) > 0:
        count += 1

print('{} {}'.format(count, count + min(8-count, len(rainbow))))