N = int(input())
A = list(map(int, input().split()))
S = set()
count = 0
for rate in A:
    if rate < 400:
        S.add("gray")
    elif rate < 800:
        S.add("brown")
    elif rate < 1200:
        S.add("green")
    elif rate < 1600:
        S.add("light_blue")
    elif rate < 2000:
        S.add("blue")
    elif rate < 2400:
        S.add("yellow")
    elif rate < 2800:
        S.add("orange")
    elif rate < 3200:
        S.add("red")
    else:
        count += 1

if count == 0:
    color_min = len(S)
    color_max = len(S)
else:
    color_max = min(len(S) + count, 7)
    color_min = max(len(S), 1)

print(color_min, color_max)