{"raw_statement":[{"iden":"problem statement","content":"You are given a sequence of $N$ integers $S = (S_1, \\ldots, S_N)$. Determine whether there is a sequence of $N+2$ integers $A = (A_1, \\ldots, A_{N+2})$ that satisfies the conditions below.\n\n*   $0\\leq A_i$ for every $i$ ($1\\leq i\\leq N+2$).\n*   $S_i = A_{i} + A_{i+1} + A_{i+2}$ for every $i$ ($1\\leq i\\leq N$).\n\nIf it exists, print one such sequence."},{"iden":"constraints","content":"*   $1\\leq N\\leq 3\\times 10^5$\n*   $0\\leq S_i\\leq 10^9$"},{"iden":"input","content":"Input is given from Standard Input from the following format:\n\n$N$\n$S_1$ $\\ldots$ $S_N$"},{"iden":"sample input 1","content":"5\n6 9 6 6 5"},{"iden":"sample output 1","content":"Yes\n0 4 2 3 1 2 2\n\nWe can verify that $S_i = A_i + A_{i+1} + A_{i+2}$ for every $i$ ($1\\leq i\\leq N$), as follows.\n\n*   $6 = 0 + 4 + 2$.\n*   $9 = 4 + 2 + 3$.\n*   $6 = 2 + 3 + 1$.\n*   $6 = 3 + 1 + 2$.\n*   $5 = 1 + 2 + 2$."},{"iden":"sample input 2","content":"5\n0 1 2 1 0"},{"iden":"sample output 2","content":"No"},{"iden":"sample input 3","content":"1\n10"},{"iden":"sample output 3","content":"Yes\n0 0 10"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}