import java.io.PrintWriter

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextList() = next().split(" ")
fun nextIntList() = nextList().map(String::toInt)
fun nextLongList() = nextList().map(String::toLong)
fun nextDoubleList() = nextList().map(String::toDouble)

val pw = PrintWriter(System.out)
fun print(s: Any = "") = pw.print(s)
fun println(s: Any = "") = pw.println(s)

fun main(args: Array<String>) {
    main()
    pw.flush()
}

fun main() {
    val N = nextInt()
    val A = nextIntList()
    val colors = IntArray(8)
    var others = 0
    for (a in A) {
        when {
            a < 400 -> colors[0]++
            a < 800 -> colors[1]++
            a < 1200 -> colors[2]++
            a < 1600 -> colors[3]++
            a < 2000 -> colors[4]++
            a < 2400 -> colors[5]++
            a < 2800 -> colors[6]++
            a < 3200 -> colors[7]++
            else -> others++
        }
    }
    val c = colors.count { it != 0 }
    val min = c.coerceAtMost(others).coerceAtLeast(c)
    val max = (c + others).coerceAtMost(8)
    println("$min $max")
}