fun main(args: Array<String>) {
    val N = nextInt()
    val A = listOfInt()
    val cl = IntArray(9)
    A.forEach { a ->
        cl[when (a) {
            in    1.. 399 -> 0
            in  400.. 799 -> 1
            in  800..1199 -> 2
            in 1200..1599 -> 3
            in 1600..1999 -> 4
            in 2000..2399 -> 5
            in 2400..2799 -> 6
            in 2800..3199 -> 7
            else -> 8
        }] += 1
    }
    var min = cl.dropLast(1).count { it > 0 }
    val max = min + cl.last()
    if (min == 0 && cl.last() > 0) min = 1
    println("$min $max")
//System.err.println(cl.joinToString())
}

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map(String::toInt)
fun listOfInt(vararg deltas: Int) = listOfString().map { Integer.parseInt(it) }.mapIndexed { index, int -> int + deltas[index % deltas.size] }
fun listOfLong(offset: Long = 0L) = listOfString().map { it.toLong() + offset}
