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

color_list = [0 for i in range(8)]
magic = 0
for i in a:
    if i < 400:
        color_list[0] += 1
    elif i < 800:
        color_list[1] += 1
    elif i < 1200:
        color_list[2] += 1
    elif i < 1600:
        color_list[3] += 1
    elif i < 2000:
        color_list[4] += 1
    elif i < 2400:
        color_list[5] += 1
    elif i < 2800:
        color_list[6] += 1
    elif i < 3200:
        color_list[7] += 1
    else:
        magic += 1

if sum(color_list) == 0:
    color_list[0] = 1
    magic -= 1
minimum = len(list(filter(lambda x:x > 0, color_list)))
diff = min(len(list(filter(lambda x:x == 0, color_list))), magic)

print(str(minimum) + " " + str(minimum+diff))