After Reda lost his gf, he told Baskot about it.
"Don't worry," Baskot said. "I'll find you a new gf."
Unfortunately, Baskot meant a generating function.
Find the polynomial with non-negative integer coefficients
$$$$$$ G(x) = c_0 + c_1x + c_2x^2 + \ldots + c_dx^d, $$$$$$
where $$$c_i \geq 0$$$ for every $$$i$$$ and $$$c_d \gt 0$$$, such that
$$$$$$ G(1) = a $$$$$$
and
$$$$$$ G(a+1) = b. $$$$$$
For arbitrary values of $$$a$$$ and $$$b$$$, such a polynomial may not exist. However, Baskot would never let his friend down, so he guarantees that exactly one valid polynomial exists for the given input.
Help Baskot introduce Reda to his new gf.
Yes, generating functions are usually infinite. This one has commitment issues. I mean, she is going to spend her time with Reda, after all.
Two integers $$$a$$$ and $$$b$$$ ($$$1 \le a \le 10^6$$$, $$$1 \le b \le 10^{18}$$$) — the napkin, $$$G(1) = a$$$ and $$$G(a+1) = b$$$. It is guaranteed that exactly one such $$$G$$$ exists.
On the first line, print $$$d+1$$$, the number of coefficients (with $$$c_d \gt 0$$$). On the second line, print $$$c_0, c_1, \dots, c_d$$$.
3 9
2 1 2
7 322
3 2 0 5
In the first sample, $$$G(x) = 1 + 2x$$$, so $$$G(1) = 3$$$ and $$$G(4) = 9$$$.
In the second sample, $$$G(x) = 2 + 5x^2$$$, so $$$G(1) = 7$$$ and $$$G(8) = 322$$$.
| Name |
|---|


