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

gray = 0
brown = 0
green = 0
lblue = 0
blue = 0
yellow = 0
orange = 0
red = 0
god = 0

min_num = 0
max_num = 0

for i in a:
    if 1 <= i <= 399:
        gray += 1
    elif 400 <= i <= 799:
        brown += 1
    elif 800 <= i <= 1199:
        green += 1
    elif 1200 <= i <= 1599:
        lblue += 1
    elif 1600 <= i <= 1999:
        blue += 1
    elif 2000 <= i <= 2399:
        yellow += 1
    elif 2400 <= i <= 2799:
        orange += 1
    elif 2800 <= i <= 3199:
        red += 1
    elif i >= 3200:
        god += 1

for i in [gray, brown, green, lblue, blue, yellow, orange, red]:
    if i != 0:
        min_num += 1

max_num = min_num
if min_num <= 6 and god != 0:
    max_num += god

print(min_num, max_num)

