fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val a = readLine()!!.split(" ").map(String::toInt)      // 1≤ai≤4800

    /** 400ごとなのでwhen不要
     * @return 0-8 */
    fun color(score: Int): Int {
        return score / 400
    }

    val counter = a.map { score -> color(score) }
    val counts = (0..8).map { d -> counter.count { c -> c == d }  }
    val count = counts.take(8).count { it != 0 }
    val highScores = counts.getOrElse(8, { 0 })
    val max = (8 to count + highScores).toList().min()!!

    print(count)
    print(" ")
    println(max)
}
