Given two integers $$$s$$$ and $$$x$$$, find any shortest array such that the sum of its elements is $$$s$$$, and all elements are coprime to $$$x$$$.
Two integers are coprime if the only positive integer that divides both of them is $$$1$$$.
The only line contains the integers $$$s$$$ and $$$x$$$ ($$$2 \leq s, x \leq 10^9$$$).
If there is no array that satisfies the condition, print a single integer $$$-1$$$.
Otherwise, the first line should contain one integer $$$n$$$ ($$$1 \leq n \leq 10^6$$$) — the length of the array. The next line should contain $$$n$$$ space-separated integers — the array itself. The elements of the array should not exceed $$$10^9$$$ in absolute value.
If there are multiple possible answers, print any. We have a proof that if a solution exists, then there exists a solution satisfying the constraints above.
9 6
3 -7 -7 23
14 34
2 83 -69
| Name |
|---|


