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
var count_zero = filter(count[0..7], proc(x:int): bool = x == 0).len
var count_over = 0
if count[8] > count_red:
  count_over = count[8] - count_red
else:
  count_over = 0
echo count_red + count_over, " ", count_red + min(count_zero, count[8])