fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val a = readLine()!!.split(' ').map(String::toInt)

    var any = 0
    var col = 0
    val exist = Array(8, {i -> false})
    for (ai in a) {
        when(ai) {
            in 1..3199 -> {
                val idx = ai / 400
                if (exist[idx] == false) {
                    exist[idx] = true
                    col++
                }
            }
            else -> any++
        }
    }
    val min = Math.max(1, col)
    val max = Math.min(8, col + any)
    println("$min $max")
}