object Main extends App {
  val n = io.StdIn.readInt
  val table = Array.ofDim[Int](9)
  io.StdIn.readLine.split(" ").map(_.toInt)
    .foreach(i => {
    i match {
      case i if i <  400 => table(0) += 1
      case i if i <  800 => table(1) += 1
      case i if i < 1200 => table(2) += 1
      case i if i < 1600 => table(3) += 1
      case i if i < 2000 => table(4) += 1
      case i if i < 2400 => table(5) += 1
      case i if i < 2800 => table(6) += 1
      case i if i < 3200 => table(7) += 1
      case i if i < 4801 => table(8) += 1
    }
  })

  val min = table.init.count(_ > 0)
  val max = min + table(8)
  val ans = min + " " + max
  println(ans)
}