N = int(input())
colors = {}
any_color = 0
for rate in list(map(int, input().split())):
    if rate < 400:
        colors['red'] = True
    elif rate < 800:
        colors['brawn'] = True
    elif rate < 1200:
        colors['green'] = True
    elif rate < 1600:
        colors['water'] = True
    elif rate < 2000:
        colors['blue'] = True
    elif rate < 2400:
        colors['yellow'] = True
    elif rate < 2800:
        colors['orange'] = True
    elif rate < 3200:
        colors['red'] = True
    else:
        any_color += 1

min_color = len(colors.keys())
max_color = min(min_color + any_color, 8)
print(min_color, max_color)
