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

gray = 0
brown = 0
green = 0
lightblue = 0
blue = 0
yellow = 0
orange = 0
red = 0
other = 0

for rate in a:
    if 1 <= rate <= 399:
        gray += 1
    elif 400 <= rate <= 799:
        brown += 1
    elif 800 <= rate <= 1199:
        green += 1
    elif 1200 <= rate <= 1599:
        lightblue += 1
    elif 1600 <= rate <= 1999:
        blue += 1
    elif 2000 <= rate <= 2399:
        yellow += 1
    elif 2400 <= rate <= 2799:
        orange += 1
    elif 2800 <= rate <= 3199:
        red += 1
    else:
        other += 1

s = [gray, brown, green, lightblue, blue, yellow, orange, red]
s = list(filter(lambda x: x > 0, s))

minimum = len(s)
maximum = len(s) + other if len(s)+other <= 8 else 8

print('{} {}'.format(minimum, maximum))
