#C3400. Construct a Cyclic Sequence

    ID: 46824 Type: Default 1000ms 256MiB

Construct a Cyclic Sequence

Construct a Cyclic Sequence

You are given two integers N and M. Your task is to determine whether it is possible to construct a sequence of length N consisting of integers such that:

  • If N is less than M, the sequence cannot be constructed and you should output "No".
  • If N is greater than or equal to M, you should construct a sequence by repeating the numbers from 1 to M in order until you have N numbers. Then, output "Yes" on the first line and the sequence (with each number separated by a single space) on the second line.

Note: The output must exactly follow the format described including the newline character after "Yes".

In mathematical terms, if a sequence A is constructed as:

\[ A_i = (i \mod M) + 1 \quad \text{for } 0 \le i < N, \]

then the output should be:

\[ \text{Yes}\\ A_0\ A_1\ \ldots\ A_{N-1} \]</p>

inputFormat

The input consists of a single line containing two space-separated integers N and M (1 ≤ M, N ≤ 105).

outputFormat

If the sequence cannot be constructed (i.e. if M > N), output a single line containing "No". Otherwise, output two lines; the first line should contain "Yes" and the second line should contain the constructed sequence with each number separated by a single space.

## sample
5 3
Yes

1 2 3 1 2

</p>