Hide

Problem I
Bacteria

Young biologist Anton has a Petri dish with $n$ bacteria.

By adding various reagents to the dish, Anton can control the number of bacteria. If $p$ is a certain prime number, Anton can produce the substance $\mathrm C_p \mathrm H_{2p+1} \mathrm O \mathrm H$ which, when added to the dish, reduces the number of bacteria exactly by a factor of $p$. If the number of bacteria is not divisible by $p$, the result of the substance’s action is undefined, and the experiment loses scientific accuracy. Anton wants to avoid this, so he only adds the substance $\mathrm C_p \mathrm H_{2p+1} \mathrm O \mathrm H$ when the number of bacteria is divisible by $p$.

Additionally, Anton has an unlimited supply of lysergic acid diethylamide ($\mathrm C_{20} \mathrm H_{25} \mathrm N_3 \mathrm O$) in his kitchen. When added to the dish, the number of bacteria is squared.

Anton wants the number of bacteria in the dish to become $m$ and he wants to add substances to the dish the least possible number of times. Help him achieve this.

Input

The input contains two natural numbers $n$ and $m$ ($1 \le n, m \le 10^9$) — the initial and the desired number of bacteria in Anton’s dish.

Output

If it is impossible to obtain exactly $m$ bacteria, output “NO”.

If the desired result is achievable, the first line should contain “YES” and the second line should contain the shortest sequence of additions of substances that allows him to achieve it, in the following format: adding the substance $\mathrm C_p \mathrm H_{2p+1} \mathrm O \mathrm H$ is encoded by the number $p$, and adding the substance $\mathrm C_{20} \mathrm H_{25} \mathrm N_3 \mathrm O$ is encoded by the number 0. The numbers should be separated by spaces.

If there are multiple shortest sequences of additions of substances that result in $m$ bacteria, output any of them.

Notes

In the first example, Anton needs to add substances to the flask three times: first, add $\mathrm C_2 \mathrm H_5 \mathrm O \mathrm H$, reducing the number of bacteria by half, leaving $6$ bacteria; then add $\mathrm C_{20} \mathrm H_{25} \mathrm N_3 \mathrm O$, squaring the number of bacteria, increasing it to 36; and finally, add $\mathrm C_2 \mathrm H_5 \mathrm O \mathrm H$ again, dividing the number of bacteria by two and making it equal to 18.

Sample Input 1 Sample Output 1
12 18
YES
2 0 2
Sample Input 2 Sample Output 2
56 6
NO

Please log in to submit a solution to this problem

Log in