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 {
        // 3600を超えた場合でも8
        return listOf(score / 400, 8).min()!!
    }

    val colors = a.map(::color)
    val counts = (0..8).map { colors.count { color -> it == color }  }
    val count = (0..7).count { counts[it] != 0 }
    val highScores = counts[8]
    // 全員3200以上ならcountは0だが、minは1
    val min = listOf(1, count).max()!!
    val max = count + highScores    //「好きな色」は8色以外の色も選べる?// listOf(8, count + highScores).min()!!

    print(min)
    print(" ")
    println(max)
}
