#arc135b. [arc135_b]Sum of Three Terms
[arc135_b]Sum of Three Terms
Problem Statement
You are given a sequence of integers . Determine whether there is a sequence of integers that satisfies the conditions below.
- for every ().
- for every ().
If it exists, print one such sequence.
Constraints
Input
Input is given from Standard Input from the following format:
Output
If there is a sequence that satisfies the conditions, print Yes
; otherwise, print No
. In the case of Yes
, print an additional line containing the elements of such a sequence , separated by spaces.
If there are multiple sequences satisfying the conditions, you may print any of them.
Sample Input 1
5
6 9 6 6 5
Sample Output 1
Yes
0 4 2 3 1 2 2
We can verify that for every (), as follows.
- .
- .
- .
- .
- .
Sample Input 2
5
0 1 2 1 0
Sample Output 2
No
Sample Input 3
1
10
Sample Output 3
Yes
0 0 10