
enum class Card{
    Taro, Hanako, Used
}
fun main(args:Array<String>):Unit{
    var n = readLine()!!.toInt()
    while(n != 0){
        val cards = Array(n * 2){Card.Hanako}
        repeat(n){
            cards[readLine()!!.toInt() - 1] = Card.Taro
        }
        var restTaro = n
        var restHanako = n
        var isTarosTurn = true
        while (restTaro != 0 && restHanako != 0){
            cards.forEachIndexed{index, card ->
                when{
                    isTarosTurn && card == Card.Taro && restHanako != 0 -> {
                        isTarosTurn = false
                        restTaro--
                        cards[index] = Card.Used
                    }
                    !isTarosTurn && card == Card.Hanako && restTaro != 0 -> {
                        isTarosTurn = true
                        restHanako--
                        cards[index] = Card.Used
                    }
                }
            }
            isTarosTurn = !isTarosTurn
        }
        println(cards.count{it == Card.Hanako})
        println(cards.count{it == Card.Taro})
        n = readLine()!!.toInt()
    }
}
