Burdock-virus sanitizer
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian.
For effective control of the burdock-virus, scientists have invented a special sanitizer device. To operate, this device uses special ampoules with an active substance. There are a total of \(n\) ampoules available. The effectiveness of the \(i\)-th of them is equal to \(a_i\) conditional units.
For the most efficient operation of the sanitizer, it must be charged with exactly \(k\) ampoules, and their total effectiveness must be an odd number. Your task is to determine which specific ampoules should be used to charge the sanitizer for its most efficient operation, or to determine that this is impossible.
Input
The first line specifies two positive integers \(n\) and \(k\) — the number of available ampoules and the number of ampoules with which the sanitizer must be charged.
The next line specifies \(n\) positive integers \(a_i\) — the effectiveness of the ampoules.
Output
In the first case, output the string yes if the
sanitizer can be charged for maximum effectiveness, or no
if this cannot be achieved.
In the case of a affirmative answer, in the next line output \(k\) numbers separated by a space — the effectiveness of the ampoules with which the sanitizer must be charged for its maximum effectiveness.
If there are several correct answers, you are allowed to output any of them.
Constraints
\(1 \le k \le n \le 10^5\),
\(1 \le a_i \le 10^9\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 3 2 1 2 3 | yes 2 3 |
| Input (stdin) | Output (stdout) |
|---|---|
| 3 2 1 3 5 | no |
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|