N = int(input())
rates = list(map(int, input().split()))
over = 0
colors = []
GREY = 0
BROWN = 1
GREEN = 2
SKY = 3
BLUE = 4
YELLOW = 5
ORANGE = 6
RED = 7

for rate in rates:
  if rate <= 399:
    if not GREY in colors:
      colors.append(GREY)
  elif rate <= 799:
    if not BROWN in colors:
      colors.append(BROWN)
  elif rate <= 1199:
    if not GREEN in colors:
      colors.append(GREEN)
  elif rate <= 1599:
    if not SKY in colors:
      colors.append(SKY)
  elif rate <= 1999:
    if not BLUE in colors:
      colors.append(BLUE)
  elif rate <= 2399:
    if not YELLOW in colors:
      colors.append(YELLOW)
  elif rate <= 2799:
    if not ORANGE in colors:
      colors.append(ORANGE)
  elif rate <= 3199:
    if not RED in colors:
      colors.append(RED)
  else:
    over += 1
min_c = len(colors)
max_c = min(8, len(colors)+over)
print(min_c, max_c)