import java.math.*

fun main(args: Array<String>) {
    val N = readInputLine().toInt()
    val cnt = IntArray(8)
    var overCnt = 0

    readInputLine().split(" ").forEach {
        val rate = it.toInt()
        if (rate >= 3200) {
            overCnt++
        } else {
            cnt[rate / 400]++
        }
    }

    println("${Math.max(1, cnt.count { it != 0 })} ${cnt.count { it != 0 } + overCnt}")
}

fun readInputLine(): String {
    return readLine()!!
}
