n = int(input())
l = list(map(int, input().split()))
c = set([])
free = 0
for r in l:
  if 1 <= r <= 399:
    c.add('grey')
  elif 400 <= r <= 799:
    c.add('brown')
  elif 800 <= r <= 1199:
    c.add('green')
  elif 1200 <= r <= 1599:
    c.add('cyan')
  elif 1600 <= r <= 1999:
    c.add('blue')
  elif 2000 <= r <= 2399:
    c.add('yellow')
  elif 2400 <= r <= 2799:
    c.add('orange')
  elif 2800 <= r <= 3199:
    c.add('red')
  elif r >= 3200:
    free += 1

if len(c) == 0:
  print(1, min(free, 8))
else:
  print(len(c), min(free+len(c), 8))