fun main() {
    val n = readLine()?.toInt() ?: return
    val a = readLine()?.split(" ")?.map(String::toInt) ?: return
    val colors = Array(9) { 0 }
    a.forEach {
        val i = when (it) {
            in 1..399 -> 0
            in 400..799 -> 1
            in 800..1199 -> 2
            in 1200..1599 -> 3
            in 1600..1999 -> 4
            in 2000..2399 -> 5
            in 2400..2799 -> 6
            in 2800..3199 -> 7
            else -> 8
        }
        colors[i]++
    }
    val rainbow = colors.last()
    val min = 0.until(8).count { colors[it] > 0 }
    if (min == 0) {
        println("1 $rainbow")
        return
    }
    val max = rainbow + min
    println("$min $max")
}