object Main {

  def main(args: Array[String]): Unit = {
    import scala.io.StdIn._
    var over3200 = 0

    val GRAY = 0
    val BROWN = 1
    val GREEN = 2
    val WATER = 3
    val BLUE = 4
    val YELLOW = 5
    val ORANGE = 6
    val RED = 7
    val OVERED = 8
    val visited = new Array[Boolean](8)

    def rateToColor(rate: Int): Int =
      if (rate <= 399) GRAY
      else if (rate <= 799) BROWN
      else if (rate <= 1199) GREEN
      else if (rate <= 1599) WATER
      else if (rate <= 1999) BLUE
      else if (rate <= 2399) YELLOW
      else if (rate <= 2799) ORANGE
      else if (rate <= 3199) RED
      else OVERED

    val N = readLine().toInt
    val a = readLine().split(" ").map(_.toInt)
    (0 until N).foreach { i =>
      val color = rateToColor(a(i))
      if (color == OVERED)
        over3200 += 1
      else {
        visited(color) = true
      }
    }

    var colors = (0 until 8) count visited
    val max = colors + Math.min(8 - colors, over3200)
    val min = if (colors == 0) 1 else colors
    println(s"$min $max")
  }

}