409580: GYM103637 H Hockey championship
Description
The competition involves $$$2 \times n$$$ teams from $$$m$$$ countries. Teams are randomly matched into $$$n$$$ pairs. You know the expected value of the number of pairs in which both teams are from the same country. Find a possible country distribution of teams which has a given expected value.
InputA single line contains two positive integers $$$x$$$ and $$$y$$$. The expected value is equal to $$$\frac{x}{y}$$$.
$$$$$$1 \le x, y \le 1000$$$$$$
OutputIf there is no suitable distribution of teams by country, print in a single line "-1".
Otherwise, in the first line of the output file print one positive integer $$$m$$$ — the number of countries in which there are teams participating in the competition. In the second line print $$$m$$$ positive integer separated by a space — the number of teams in the corresponding country. The sum of the printed numbers has to be even and must not exceed $$$10^4$$$. It is guaranteed that if there is a suitable distribution, then there is a distribution that satisfies the given restrictions.
ExamplesInput2 1Output
1 4Input
1 2Output
-1