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

    val color = BooleanArray(8)
    var free=0
    a.forEach {
        if (it >= 3200) {
            free++
        } else {
            color[it/400] = true
        }
    }
    val ans=color.count{it}
    println( "$ans "+Math.min(8,ans+free))

}