Card Captor Sanggeun

No attempts yetTime limit1sMemory limit128 MB

Problem

A card game like the following is popular at a certain school.

  • It uses $2n$ cards, each printed with one distinct integer from $1$ to $2n$.
  • The cards are split between two players, $n$ cards each.
  • The two players take turns playing one card at a time, following these rules:
    • If there is no card on the table, a player may play any card.
    • If there is a card on the table, a player may only play a card whose number is larger than the last card played.
    • If a player has no card they can play, the turn passes to the opponent and every card currently on the table is discarded.
  • The game starts with no card on the table.
  • The game ends as soon as either player has played all of their cards.
  • When the game ends, each player earns a score equal to the number of cards the opponent is still holding.

Sanggeun and Geunsang face off in this game. The game starts on Sanggeun's turn, and the two players have agreed to always play the smallest-numbered card among those they are allowed to play. Given the cards dealt to each player, write a program that outputs the scores of Sanggeun and Geunsang.

Input

The first line contains $n$. ($1 \le n \le 100$)

Each of the next $n$ lines contains one number printed on a card dealt to Sanggeun. Every card from $1$ to $2n$ that Sanggeun did not receive is dealt to Geunsang.

Output

Print Sanggeun's score on the first line and Geunsang's score on the second line.