object Main {
  def main(args: Array[String]): Unit = {
    val n = io.StdIn.readLine().toInt
    val arr = io.StdIn.readLine().split(' ').map(x => {
      val a = x toInt;
      if (1 <= a && a < 400) 0;
      else if (400 <= a && a < 800) 1;
      else if (800 <= a && a < 1200) 2;
      else if (1200 <= a && a < 1600) 3;
      else if (1600 <= a && a < 2000) 4;
      else if (2000 <= a && a < 2400) 5;
      else if (2400 <= a && a < 2800) 6;
      else if (2800 <= a && a < 3200) 7;
      else 8
    })

    val (fixs, anys) = arr.partition(_ < 8)
    val anyNum = anys.length
    val colors = fixs.distinct
    val (min, max) = if (anyNum == 0) (colors.length, colors.length)
    else {
      if (colors.length == 0) {
        if(anyNum > 7) (1, 7)
        else (1, anyNum)
      } else {
        if (anyNum + colors.length > 7) (colors.length, 7)
        else (colors.length, anyNum + colors.length)
      }
    }

    println(min.toString + ' ' + max.toString
    )
  }
}