#include <iostream>
using namespace std;

int main() {
	while(1){
		int n;
		cin >> n;
		if(n == 0)break;
		int card[201] = {0}, hoge;
		for(int i = 0; i < n; i++){
			cin >> hoge;
			card[hoge] = 1;
		}
		int now = 0, away[2] = {0};
		bool p = 1;
		while(1){
			if(away[0] == n || away[1] == n)break;
			for(int i = 1; i <= 2 * n; i++){
				if(card[i] == p){
					card[i] = -1;
					away[p]++;
					p = !p;
				}
			}
			p = !p;
		}
		cout << n - away[0] << endl;
		cout << n - away[1] << endl;
	}
	return 0;
}