N = int(input())
a = [int(i) for i in input().split()]

colors = {
  'gray': 0,
  'blown': 0,
  'green': 0,
  'water': 0,
  'blue': 0,
  'yellow': 0,
  'orange': 0,
  'red': 0,
}
over_3200 = 0

for rate in a:
  if 1 <= rate <= 399:
    colors['gray'] += 1
  elif 400 <= rate <= 799:
    colors['blown'] += 1
  elif 800 <= rate <= 1199:
    colors['green'] += 1
  elif 1200 <= rate <= 1599:
    colors['water'] += 1
  elif 1600 <= rate <= 1999:
    colors['blue'] += 1
  elif 2000 <= rate <= 2399:
    colors['yellow'] += 1
  elif 2400 <= rate <= 2799:
    colors['orange'] += 1
  elif 2800 <= rate <= 3100:
    colors['red'] += 1
  elif rate >= 3200:
    over_3200 += 1

min_kinds = len([i for i in list(colors.values()) if i != 0])
max_kinds = (min_kinds + over_3200) if min_kinds + over_3200 <= 8 else 8
print(' '.join([str(min_kinds), str(max_kinds)]))