You are given an array of length and an arbitrary integer .
For an array, of length , we can define its score as and cost as .
where and .
Now, we have to print an array of length whose score is equal to . If there are multiple such arrays print the array whose cost is minimum. If there are multiple such arrays with minimum cost print any.
The first line of the input contains integers and — the size of the set and an arbitrary integer mentioned in the statement.
The second line contains integers , all are distinct — the elements of the array .
If there is no array whose score is equal to , print NO in a single line.
If there is a solution, print YES and in the second line print space separated integers — the array satisfying the conditions mentioned in the statement.
Input | Output |
---|---|
3 2 1 3 5 | YES 1 1 0 |