object Main extends App {
    scala.io.StdIn.readLine()
    val ary = scala.io.StdIn.readLine().split(" ").map(_.toInt)
    val comp = Array(
        (x:Int) => 1 <= x && x <= 399,
        (x:Int) => 400 <= x && x <= 799,
        (x:Int) => 800 <= x && x <= 1199,
        (x:Int) => 1200 <= x && x <= 1599,
        (x:Int) => 1600 <= x && x <= 1999,
        (x:Int) => 2000 <= x && x <= 2399,
        (x:Int) => 2400 <= x && x <= 2799,
        (x:Int) => 2800 <= x && x <= 3199
        )
    def cnt(ary: Array[Int], f: Array[(Int) => Boolean]): Array[Int] = {
        for (func <- f) yield ary.count(func(_))
    }
    val ret = cnt(ary, comp).count(_>0)
    val min = if (ret==0) 1 else ret
    val max = math.min(ret+ary.count(_>=3200),8)
    println(min+" "+max)
}
