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
     }
   }

   assert(rates.size==N)

   val colors=rates.filter{it!=Rate.ANY}
   val anies=rates.filter{it==Rate.ANY}
   var kinds_min=colors.toSet().size
   val kinds_max=kinds_min+anies.size
  //  kinds_min+=arrayOf(0,anies.size-kinds_min).max()!!
   kinds_min=if(kinds_min==0) {1} else {kinds_min}
  
   println("${kinds_min} ${kinds_max}")
  }
}
