import java.util.Scanner


object Main extends App {
  val sc = new Scanner(System.in)

  val n = sc.nextInt()

  val t = Range(0, n).map(_ => sc.nextInt())
    .sortBy(x => x)
    .map(i => math.min(i/400, 8))
    .groupBy(x => x)
    .toStream
    .sortBy(t => t._1)
    .foldLeft((0, 0)) {
      case ((minV, maxV), (id, seq)) => id match {
        case 8 => (math.max(minV, 1), math.min(8, maxV + seq.size))
        case _ => (minV + 1, maxV + 1)
      }
    }

  println(s"${t._1} ${t._2}")
}