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

colors = set()
free_num = 0
for rate in a:
    if rate < 400:
        colors.add("grey")
    elif rate < 800:
        colors.add("brown")
    elif rate < 1200:
        colors.add("green")
    elif rate < 1600:
        colors.add("sky")
    elif rate < 2000:
        colors.add("blue")
    elif rate < 2400:
        colors.add("yellow")
    elif rate < 2800:
        colors.add("orange")
    elif rate < 3200:
        colors.add("red")
    else:
        free_num += 1
        
print(len(colors), free_num + len(colors))