
fun main(args: Array<String>) {
    var N = readLine()!!.toInt()
    var a = readLine()!!.split(" ")
        .map{it.toInt()}
        .map{
            when{
            	1<=it && it <= 399-> "hai"
            	400<=it && it<=799-> "tya"
            	800<=it && it<=1199-> "mido"
            	1200<=it && it<=1599-> "mizu"
            	1600<=it && it<=1999-> "ao"
            	2000<=it && it<=2399-> "ki"
            	2400<=it && it<=2799-> "dai"
            	2800<=it && it<=3199-> "aka"
            	else -> "any"
            }
        }
    
    var min = a.filter{it != "any"}.toSet().size
    var n_any = a.filter{it=="any"}.size
    var nakatta = listOf("hai","tya","mido","mizu","ao","ki","dai","aka")
                 .filter{!a.contains(it)}.size
    var max = min+ when{nakatta<n_any->nakatta; else->n_any}
    println("$min $max")
}
