fun main(args: Array<String>) {
    readLine()!!
    val an = readLine()!!.split(" ").map(String::toInt)

    val flag = BooleanArray(8)
    var freeCount = 0
    an.forEach {
        when {
            it in 1..399 -> flag[0] = true
            it in 400..799 -> flag[1] = true
            it in 800..1199 -> flag[2] = true
            it in 1200..1599 -> flag[3] = true
            it in 1600..1999 -> flag[4] = true
            it in 2000..2399 -> flag[5] = true
            it in 2400..2799 -> flag[6] = true
            it in 2800..3199 -> flag[7] = true
            else -> freeCount++
        }
    }
    val count = flag.count { it }

    val min = when (count) {
        0 -> 1
        else -> count
    }
    val max = count + freeCount

    println("$min $max")
}

