Frogs

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

There are nn frogs sitting on nn rocks which are located on a straight line. Each rock contains exactly one frog. The rocks (as well as the frogs) are numbered by consecutive integers from 11 to nn in the order of their positions on the line. 

The frogs have a secret plan of taking over the world that involves all of them performing jumps at the same time in such way that, after their jumps, each rock still contains exactly one frog. Denote the destination rock of the ii-th frog as p_ip\_i. Some frogs may have possibly jumped in place, that is, p_ip\_i may be equal to ii.

There is a satellite high in the sky that tracks the frogs' movements. For technical reasons, it only tracks targets that are in motion. So the information it provides is the following: for each of the n1n-1 intervals between the rocks, it is known how many frogs crossed this interval in either direction.

The frogs have jumped once as described above. Find any sequence p_ip\_i that satisfies the observed n1n - 1 numbers of crossings.

입력

The first line contains an integer nn, the number of frogs (2n200,0002 \leq n \leq 200\\,000).

The second line contains n1n - 1 space-separated integers a_1,,a_n1a\_1, \ldots, a\_{n-1} (0a_i200,0000 \leq a\_i \leq 200\\,000), ii-th of them denotes the number of frogs that crossed the interval between rocks ii and i+1i + 1.

출력

If a required permutation doesn't exist, output "No" (without the quotes). Otherwise, output "Yes" on the first line. On the second line, output nn integers p_1,p_2,,p_np\_1, p\_2, \ldots, p\_n such that if the frogs perform jumps according to this sequence, each rock still contains exactly one frog, and the observed numbers of crossings of all intervals between the rocks are as given. If there are several possible answers, output any one of them.