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

    val colors = a.map { score -> color(score) }
    val counts = (0..8).map { color -> colors.count { 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 = listOf(8, count + highScores).min()!!

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