object Main extends App {
    
    def points2Color(n: Int): Int = {
        n match {
            case n if n < 400 => 1
            case n if n < 800 => 2
            case n if n < 1200 => 3
            case n if n < 1600 => 4
            case n if n < 2000 => 5
            case n if n < 2400 => 6
            case n if n < 2800 => 7
            case n if n < 3200 => 8
            case _ => 0
        }
    }
    
    val sc = new java.util.Scanner(System.in)
    val N = sc.nextInt
	val as = Array.fill(N)(sc.nextInt).map(points2Color(_))
    
    val tcn = as.filter(_ == 0).length
    val cn  = as.filter(_ != 0).groupBy(identity).size
    
    val min_color = cn + (if (tcn > 0 && cn == 0) 1 else 0)
    val max_color = cn + (if (tcn > 8) 8 else tcn)
    
    println(s"${min_color} ${max_color}")
}