fun color(rate: Int): Int {
    val c = rate / 400
    return Math.min(c, 8)
}

fun main(args: Array<String>) {
    readLine()
    val players = IntArray(9)
    readLine()!!.split(' ').forEach { rate ->
        val color = color(rate.toInt())
        players[color]++
    }
    var vmin = (0..7).filter { 0 < players[it] }.count()
    if (vmin == 0) {
        vmin = 1
        players[8]--
    }
    val vmax = vmin + players[8]
    println("$vmin $vmax")
}
