#arc153c. [arc153_c]± Increasing Sequence

[arc153_c]± Increasing Sequence

Problem Statement

You are given a sequence of length NN, A=(A1,ldots,AN)A = (A_1, \\ldots, A_N), consisting of 11 and \-1\-1.

Determine whether there is an integer sequence x=(x1,ldots,xN)x = (x_1, \\ldots, x_N) that satisfies all of the following conditions, and print one such sequence if it exists.

  • xileq1012|x_i| \\leq 10^{12} for every ii (1leqileqN1\\leq i\\leq N).
  • xx is strictly increasing. That is, x1<cdots<xNx_1 < \\cdots < x_N.
  • sumi=1NAixi=0\\sum_{i=1}^N A_ix_i = 0.

Constraints

  • 1leqNleq2times1051\\leq N\\leq 2\\times 10^5
  • Aiinlbrace1,1rbraceA_i \\in \\lbrace 1, -1\\rbrace

Input

The input is given from Standard Input in the following format:

NN A1A_1 ldots\\ldots ANA_N

Output

If there is an integer sequence xx 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 xx in the subsequent line, separated by spaces.

x1x_1 ldots\\ldots xNx_N

If multiple integer sequences satisfy the conditions, you may print any of them.


Sample Input 1

5
-1 1 -1 -1 1

Sample Output 1

Yes
-3 -1 4 5 7

For this output, we have sumi=1NAixi=(3)+(1)45+7=0\\sum_{i=1}^NA_ix_i= -(-3) + (-1) - 4 - 5 + 7 = 0.


Sample Input 2

1
-1

Sample Output 2

Yes
0

Sample Input 3

2
1 -1

Sample Output 3

No