N = gets.to_i
As = gets.split.map(&:to_i)

cs = As.each_with_object(Array.new(N + 1, 0)){|a, o| o[a] += 1}
ds = (1 .. N).each_with_object(Array.new(N + 1, 0)){|i, o| o[cs[i]] += 1}
dcs = ds.reverse.inject([0]){|a, x| a << a.last + x}.drop(1).reverse
n, ans = N, N
(1 .. N).each do |k|
  while n < k*ans
    n -= dcs[ans]
    ans -= 1
  end
  puts ans
end