import sequtils, strutils, math, algorithm

var
  n = parseInt(readLine(stdin))
  a = readLine(stdin).split().map(parseInt)
  count = newseqWith(9, 0)
for an in a:
  if an < 400:
    inc(count[0])
  elif an < 800:
    inc(count[1])
  elif an < 1200:
    inc(count[2])
  elif an < 1600:
    inc(count[3])
  elif an < 2000:
    inc(count[4])
  elif an < 2400:
    inc(count[5])
  elif an < 2800:
    inc(count[6])
  elif an < 3200:
    inc(count[7])
  else:
    inc(count[8])
var
  count_red = filter(count[0..7], proc(x:int): bool = x > 0).len
  count_zero = filter(count[0..7], proc(x:int): bool = x == 0).len
if count_red == 0:
  echo 1, " ", min(count_zero, count[8])
else:
  echo count_red + count[8] - min(count_red, count[8]), " ", count_red + min(count_zero, count[8])