enum class Rate {
  GRAY,BROWN,GREEN,SKY,BLUE,YELLOW,ORANGE,RED,ANY
}
object MainKt {
  @JvmStatic fun main(args:Array<String>) {
   val N=readLine()!!.toInt()

   val rates=readLine()!!.split(" ").map(String::toInt).map{
     when(it) {
       in 1..399 ->Rate.GRAY
       in 400..799 -> Rate.BROWN
       in 800..1199 -> Rate.GREEN
       in 1200..1599 -> Rate.SKY
       in 1600..1999 -> Rate.BLUE
       in 2000..2399 -> Rate.YELLOW
       in 2400..2799 -> Rate.ORANGE
       in 2800..3199 -> Rate.RED
       else-> Rate.ANY
     }
   }
   val kinds_min=rates.filter{it!=Rate.ANY}.toSet().size
   val kinds_max=kinds_min+arrayOf(9-kinds_min,rates.filter{it==Rate.ANY}.size).min()!!
   println("${kinds_min} ${kinds_max}")
  }
}
