object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val as = List.fill(n)(sc.nextInt())
  val r = 0 to 3200 by 400
  val cs = as.map(a => r.lastIndexWhere(_ <= a))
  val colors = cs.filter(_ != 8).distinct.length
  val x = cs.count(_ == 8)
  val min = colors.max(1)
  val max = colors + x
  println(s"$min $max")
}