407938: GYM102946 E Evenly Distributed

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Evenly Distributedtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

Emily the shark loves fish. In fact, she can't live without fish.

Emily has $$$n$$$ fish tanks. Each fish tank may have some fish in it. For a set of fish tanks, they are "evenly distributed" if they can be partitioned into two groups of fish tanks, such that the total amount of fish in both groups are equal. For example,

  • If three fish tanks have 2, 3, and 5 fish in them respectively, then they are evenly distributed, because you can partition them into two groups (the first and second tanks in one group and the third in the other group), so that each group has 5 fish in total.
  • If three fish tanks have 2, 2, and 6 fish in them respectively, then they are not evenly distributed, because no such partition exists.

Emily has a total of $$$k$$$ fish in her $$$n$$$ fish tanks, and she wants to rearrange all fish such that:

  • The amount of fish in each tank is a positive integer.
  • The total amount of fish is $$$k$$$.
  • For every non-empty subset of these fish tanks, the subset is not evenly distributed.

Please help Emily find such an arrangement, or determine if it's impossible.

Input

The input consists of two integers $$$k$$$ and $$$n$$$.

Technical specification:

  • $$$1 \le n \le k \le 200$$$
Output

If the fish cannot be arranged according to Emily's rules, print the string No.

Otherwise, print the string Yes on the first line. Then on the second line, print a list of $$$n$$$ space-separated integers, denoting the amount of fish in each tank. If there are multiple answers, print any one of them.

ExamplesInput
9 3
Output
Yes
2 3 4
Input
6 3
Output
No

加入题单

上一题 下一题 算法标签: