import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val as = Array.fill(n)(sc.nextInt())
    var grey = 0
    var brown = 0
    var green = 0
    var lblue = 0
    var blue = 0
    var yellow = 0
    var orange = 0
    var red = 0
    var other = 0

    as.foreach {
      case x if 1 until 400 contains (x)     => grey = 1
      case x if 400 until 800 contains (x)   => brown = 1
      case x if 800 until 1200 contains (x)  => green = 1
      case x if 1200 until 1600 contains (x) => lblue = 1
      case x if 1600 until 2000 contains (x) => blue = 1
      case x if 2000 until 2400 contains (x) => yellow = 1
      case x if 2400 until 2800 contains (x) => orange = 1
      case x if 2800 until 3200 contains (x) => red = 1
      case _                                 => other += 1
    }

    val sum = grey + brown + green + lblue + blue + yellow + orange + red
    val min = sum + other - math.min(sum, other)
    val max = sum + other
    println(s"$min $max")
  }
}
