require 'set'

def sim(t, ds)
  return ds.shift if t == nil
  if i = ds.bsearch_index { |d| d > t }
    return ds.delete_at i
  end
  nil
end

loop do
  n = gets.to_i
  break if n == 0
  all = Set.new(1..2*n)
  taro = ds1 = n.times.map { gets.to_i }.sort
  hanako = ds2 = (all -ds1).sort
  t = nil
  until ds1.empty? || ds2.empty?
    t = sim(t, ds1)
    ds1, ds2 = ds2, ds1
  end
  puts hanako.size, taro.size
end
