Problems
Divisibility of binomial coefficients
Divisibility of binomial coefficients
\includegraphics{https://static.e-olymp.com/content/ac/ac1d6b9e5c2e474fc77e1b3547f16abf288cb49c.jpg}
Let us denote , where \textbf{0} ≤ \textbf{i} ≤ \textbf{n} and \textbf{n}, \textbf{i }are integer numbers. You are given a positive integer \textbf{n} and a prime \textbf{p}. We denote by \textbf{k} the greatest nonnegative integer such that inequality \textbf{p^k} ≤ \textbf{n} holds. Then we denote by \textbf{a_j} (\textbf{j} ≥ \textbf{0}) the number of integers \textbf{i} from \{\textbf{0}, \textbf{1}, ..., \textbf{n}\} such that \textbf{C^i_n} is divisible by \textbf{p^j}, but is not divisible by \textbf{p^\{j+1\}}. It is easy to verify that \textbf{a_j} = \textbf{0} for \textbf{j} > \textbf{k}. Therefore you are required to find numbers \textbf{a_0}, \textbf{a_1}, ..., \textbf{a_k}.
\InputFile
The only line of the input file consists of a positive integer \textbf{n} ≤ \textbf{10^18} and a prime \textbf{p} < \textbf{10^18}.
\OutputFile
In the only line of the output file write numbers \textbf{a_0}, \textbf{a_1}, ..., \textbf{a_k} separated by spaces.
Input example #1
4 2
Output example #1
2 1 2