#ARC153C. [ARC153C] ± Increasing Sequence
[ARC153C] ± Increasing Sequence
Score : points
Problem Statement
You are given a sequence of length , , consisting of and .
Determine whether there is an integer sequence that satisfies all of the following conditions, and print one such sequence if it exists.
- for every ().
- is strictly increasing. That is, .
- .
Constraints
Input
The input is given from Standard Input in the following format:
Output
If there is an integer sequence that satisfies all of the conditions in question, print Yes; otherwise, print No. In case of Yes, print the elements of such an integer sequence in the subsequent line, separated by spaces.
If multiple integer sequences satisfy the conditions, you may print any of them.
5
-1 1 -1 -1 1
Yes
-3 -1 4 5 7
For this output, we have .
1
-1
Yes
0
2
1 -1
No