fun ans (a: Array<Int>): String {
  val count = a.count{it >= 1}
  if (a[8] == 0) {
    return "${count} ${count}"
  } else if (count != 1) {
    return "${count-1} ${count-1+a[8]}"
  } else {
    return "${1} ${count-1+a[8]}"
  }
}

fun main (args: Array<String>) {
  val N = readLine()!!.toInt()
  var a = readLine()!!.split(" ")
  var lis = Array(9, {0})
  var idx = 0
  for (i in 0..2800 step 400){
    lis[idx] = a.filter{i <= it.toInt()}.filter{it.toInt() < i + 400}.size
    idx++
  }
  lis[8] = a.filter{3200 <= it.toInt()}.size
  println(ans(lis))
}
