#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <memory>
#include <numeric>
#include <cstring>
#include <cmath>

using namespace std;

int main(int argc, char *argv[]) {
  int n;
  vector<int> taro, hanaco;
  taro.reserve(100);
  hanaco.reserve(100);
  while (cin >> n, n) {
    for (int i = 0, tmp; i < n; i++) {
      cin >> tmp;
      taro.push_back(tmp);
    }
    sort(taro.begin(), taro.end());
    for (int i = 1, j = 0; i <= 2 * n; i++)
      if (taro[j] == i)
        j++;
      else
        hanaco.push_back(i);
    /*                                                                                                                                                                                                                                                                                                                                              
    cout << "taro   [";                                                                                                                                                                                                                                                                                                                             
    for_each(taro.begin(), taro.end(),                                                                                                                                                                                                                                                                                                              
             [](int x) {                                                                                                                                                                                                                                                                                                                            
               cout << x << ", ";                                                                                                                                                                                                                                                                                                                   
             });                                                                                                                                                                                                                                                                                                                                    
    cout << "\b\b]\nhanaco [";                                                                                                                                                                                                                                                                                                                      
    for_each(hanaco.begin(), hanaco.end(),                                                                                                                                                                                                                                                                                                          
             [](int x) {                                                                                                                                                                                                                                                                                                                            
               cout << x << ", ";                                                                                                                                                                                                                                                                                                                   
             });                                                                                                                                                                                                                                                                                                                                    
    cout << "\b\b]" << endl;                                                                                                                                                                                                                                                                                                                        
    */
    int card = 0;
    enum Turn {T = 0, H};
    enum Turn turn = T;
    vector<int> *player = &taro;
    while (true) {
      if (turn == T)
        player = &taro;
      else
        player = &hanaco;
      auto itr = find_if(player->begin(), player->end(),
                         [card](int x) -> bool {
                           return x > card;
                         });
      if (itr != player->end()) {
        /*                                                                                                                                                                                                                                                                                                                                          
        cout << (turn == T ? "taro   " : "hanaco ");                                                                                                                                                                                                                                                                                                
        cout << *itr << endl;                                                                                                                                                                                                                                                                                                                       
        */
        card = *itr;
        player->erase(itr);

      } else {
        card = 0;
      }

      if (player->empty()) {
        cout << hanaco.size() << endl;
        cout << taro.size() << endl;
        break;
      } else {
        turn = (turn == T ? H : T);
      }
    }
    taro.clear();
    hanaco.clear();
  }
  return 0;
}

Measured memory_bytes: 1216