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]++
    }
    val variation = (0..7).filter { 0 < players[it] }.count()
    val anycolor = players[8]
    if (variation == 8 || anycolor == 0) {
        println("$variation $variation")
    } else {
        println("$variation ${Math.min(variation + anycolor, 8)}")
    }
}
