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]
    val vmin = if (variation == 0) 1 else variation
    val vmax = Math.min(variation + anycolor, 8)
    println("$vmin $vmax")
}
