import java.io.PrintWriter

val pw = PrintWriter(System.out)

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

fun func() {
    val n = nextInt()
    val aa = listOfInt()
    val rates = mutableSetOf<String>()

    var freeColors = 0

    aa.forEach {
        when {
            it < 400 -> rates.add("Grey")
            it < 800 -> rates.add("Brown")
            it < 1200 -> rates.add("Green")
            it < 1600 -> rates.add("LightBlue")
            it < 2000 -> rates.add("Blue")
            it < 2400 -> rates.add("Yellow")
            it < 2800 -> rates.add("Orange")
            it < 3200 -> rates.add("Red")
            else -> freeColors++
        }
    }

    println("${rates.size} ${rates.size + freeColors}");
}

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { it.toInt() }

fun println(value : Any) {
    pw.println(value)
}