n = int(input())
a = list(map(int, input().split()))

gray = 0
blown = 0
green = 0
light_blue = 0
blue = 0
yellow = 0
orange = 0
red = 0
constant = 0
variable = 0

for i in a:
    if i < 400 and gray == 0:
        gray = 1
        constant += 1
        continue
    elif 400 <= i < 800 and blown == 0:
        blown = 1
        constant += 1
        continue
    elif 800 <= i < 1200 and green == 0:
        green = 1
        constant += 1
        continue
    elif 1200 <= i < 1600 and light_blue == 0:
        light_blue = 1
        constant += 1
        continue
    elif 1600 <= i < 2000 and blue == 0:
        blue = 1
        constant += 1
        continue
    elif 2000 <= i < 2400 and yellow == 0:
        yellow = 1
        constant += 1
        continue
    elif 2400 <= i < 2800 and orange == 0:
        orange = 1
        constant += 1
        continue
    elif 2800 <= i < 3200 and red == 0:
        red = 1
        constant += 1
        continue
    elif i >= 3200:
        variable += 1

if constant < variable:
    print(variable, constant+variable)
else:
    print(constant, constant)
