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

colors = { "gray": 0, "brown": 0, "green": 0, "water": 0, "blue": 0, "yellow": 0, "orange": 0, "red": 0 }

other = 0

for a in A:
  if 1 <= a <= 399:
    colors["gray"] += 1
  elif 400 <= a <= 799:
    colors["brown"] += 1
  elif 800 <= a <= 1199:
    colors["green"] += 1
  elif 1200 <= a <= 1599:
    colors["water"] += 1
  elif 1600 <= a <= 1999:
    colors["blue"] += 1
  elif 2000 <= a <= 2399:
    colors["yellow"] += 1
  elif 2400 <= a <= 2799:
    colors["orange"] += 1
  elif 2800 <= a <= 3199:
    colors["red"] += 1
  else:
    other += 1

num = len(list(filter(lambda x: x > 0, colors.values())))

print(num, min(num + other, 8))