gray, brown, green, sky_blue, blue, yellow, orange, red = [0] * 8
N = int(input())
alist = list(map(int, input().split()))
free = 0
for a in alist:
    if 1 <= a <= 399:
        gray += 1
    elif 400 <= a <= 799:
        brown += 1
    elif 800 <= a <= 1199:
        green += 1
    elif 1200 <= a <= 1599:
        sky_blue += 1
    elif 1600 <= a <= 1999:
        blue += 1
    elif 2000 <= a <= 2399:
        yellow += 1
    elif 2400 <= a <= 2799:
        orange += 1
    elif 2800 <= a <= 3199:
        red += 1
    else:
        free += 1
colors = [color for color in [gray, brown, green, sky_blue, blue, yellow, orange, red] if color > 0]
print(len(colors), len(colors) + free)
