fun main(args: Array<String>) {
    val n = readLine()?.toInt() ?: return
    val aList = readLine()?.split(" ")?.map { it.toInt() } ?: return

    val result = mutableSetOf<Int>()
    var overRed = 0

    for (a in aList) {
        when (a) {
            in 1..399 -> {
                result += 0
            }
            in 400..799 -> {
                result += 1
            }
            in 800..1199 -> {
                result += 2
            }
            in 1200..1599 -> {
                result += 3
            }
            in 1600..1999 -> {
                result += 4
            }
            in 2000..2399 -> {
                result += 5
            }
            in 2400..2799 -> {
                result += 6
            }
            in 2800..3199 -> {
                result += 7
            }
            else -> {
                overRed++
            }
        }
    }
    val min = if (result.isEmpty()) 1 else result.size
    val max = result.size + overRed

    println("$min $max")
}