def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N = intinp()
a = mapint_inp()

def get_color(x):
    c = None
    if 399 >= x: c = "Gray"
    elif 799 >= x: c = "Blown"
    elif 1199 >= x: c = "Green"
    elif 1599 >= x: c = "Sky"
    elif 1999 >= x: c = "Blue"
    elif 2399 >= x: c = "Yellow"
    elif 2799 >= x: c = "Orange"
    elif 3199 >= x: c = "red"
    else:
        c = "Any"
    return c

color_set = set()
any_num = 0

for a_i in a:
    c_i = get_color(a_i)
    if c_i == "Any":
        any_num += 1
        continue
    if c_i not in color_set:
        color_set.add(c_i)

base_num = len(color_set)

if any_num == 0:
    print(base_num, base_num)
else:
    rest_color = 8 - base_num
    if rest_color <  0:
        print(base_num, base_num)
    elif rest_color >= any_num:
        print(base_num, base_num+any_num)
    else:
        print(base_num, base_num+rest_color)