import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n  = sc.nextInt
  val al = List.fill(n)(sc.nextInt)

  val colourType = al.foldLeft((0,0,0,0,0,0,0,0,0)){case ((gray, brouwn, green,lightBlue, blue, yellow, orange, red, free),a) =>
      a match{
        case x if    1 <= x && x <=  399 => (gray + 1, brouwn   , green   ,lightBlue   , blue   , yellow   , orange   , red    , free    )
        case x if  400 <= x && x <=  799 => (gray    , brouwn+ 1, green   ,lightBlue   , blue   , yellow   , orange   , red    , free    )
        case x if  800 <= x && x <= 1199 => (gray    , brouwn   , green+ 1,lightBlue   , blue   , yellow   , orange   , red    , free    )
        case x if 1200 <= x && x <= 1599 => (gray    , brouwn   , green   ,lightBlue+ 1, blue   , yellow   , orange   , red    , free    )
        case x if 1600 <= x && x <= 1999 => (gray    , brouwn   , green   ,lightBlue   , blue+ 1, yellow   , orange   , red    , free    )
        case x if 2000 <= x && x <= 2399 => (gray    , brouwn   , green   ,lightBlue   , blue   , yellow+ 1, orange   , red    , free    )
        case x if 2400 <= x && x <= 2799 => (gray    , brouwn   , green   ,lightBlue   , blue   , yellow   , orange+ 1, red    , free    )
        case x if 2800 <= x && x <= 3199 => (gray    , brouwn   , green   ,lightBlue   , blue   , yellow   , orange   , red + 1, free    )
        case _                           => (gray    , brouwn   , green   ,lightBlue   , blue   , yellow   , orange   , red    , free + 1)
      }
  }

  val (gray, brouwn, green,lightBlue, blue, yellow, orange, red, free) = colourType

  val diffinedCol =
    (if(gray > 0) 1 else 0) +
    (if(brouwn > 0) 1 else 0) +
    (if(green > 0) 1 else 0) +
    (if(lightBlue > 0) 1 else 0) +
    (if(blue > 0) 1 else 0) +
    (if(yellow > 0) 1 else 0) +
    (if(orange > 0) 1 else 0) +
    (if(red > 0) 1 else 0)

  val max = diffinedCol + free
  val min = if(diffinedCol == 0) 1 else diffinedCol

  println(s"$min $max")
}