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 = max(1, 0.until(8).count { colors[it] > 0 })
    val max = if (min == 8 || rainbow == 0) {
        min
    } else {
        if (rainbow + min > 8) {
            8
        } else {
            rainbow + min
        }
    }
    println("$min $max")
}