fun main(args: Array<String>) {
    val n = readInt()
    val a = readIntList()

    val col = MutableList(8) { 0 }
    var cnt = 0
    a.forEach { rate ->
        when (rate) {
            in 1..399 -> col[0]++
            in 400..799 -> col[1]++
            in 800..1199 -> col[2]++
            in 1200..1599 -> col[3]++
            in 1600..1999 -> col[4]++
            in 2000..2399 -> col[5]++
            in 2400..2799 -> col[6]++
            in 2800..3199 -> col[7]++
            else -> cnt++
        }
    }

    val min = col.count { it != 0 }
    if (min == 0) {
        print(1)
    } else {
        print(min)
    }
    print(" ")

    repeat(cnt) {
        val ind = col.indexOfFirst { it == 0 }
        if (ind != -1) {
            col[ind]++
        }
    }
    println(col.count { it != 0 })
}

// Tools
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)