As Duarte wakes up, he notices he is in a huge dungeon where $$$n$$$ obelisks stand in a circle.
Suddenly, a tall and mysterious figure appears in front of him, and he says:
"I am the evil logic wizard, and I kidnapped you for a test. As you can observe, these obelisks are numbered from $$$1$$$ to $$$n$$$ clockwise, where the obelisks $$$i$$$ and $$$i+1$$$ are neighbouring obelisks for $$$1 \leq i \leq n-1$$$, as well as obelisks $$$n$$$ and $$$1$$$. The distance between two obelisks numbered $$$i$$$ and $$$j$$$ is defined as $$$min(|i-j|,n-|i-j|)$$$.
Each obelisk is filled with an unknown number of unique treasures, and each obelisk has between $$$0$$$ and $$$1000$$$ treasures, inclusive.
From obelisk $$$1$$$ I emit a magical signal, which determines for each $$$i$$$ from $$$0$$$ to $$$\lfloor \frac{n}{2} \rfloor$$$ the number of treasures at distance exactly $$$i$$$.
I also emit a magic signal from the center of all obelisks, which determines the number of unordered pairs of treasures (each treasure is unique) at distance exactly $$$i$$$, for each $$$i$$$ from $$$0$$$ to $$$\lfloor \frac{n}{2} \rfloor$$$.
Determine a placement of the treasures that is consistent with my information, or you'll be forever stuck in this dungeon!"
The first line contains an integer $$$n$$$ $$$(2 \leq n \leq 32)$$$, containing the number of obelisks.
The second line contains $$$\lfloor \frac{n}{2} \rfloor+1$$$ integers $$$a_0,a_1,\dots,a_{\lfloor \frac{n}{2} \rfloor}$$$, where $$$a_i$$$ $$$(1 \leq a_i \leq 10^8)$$$ indicates the number of treasures at distance $$$i$$$ from obelisk $$$1$$$.
The second line contains $$$\lfloor \frac{n}{2} \rfloor+1$$$ integers $$$b_0,b_1,\dots,b_{\lfloor \frac{n}{2} \rfloor}$$$, where $$$b_i$$$ $$$(1 \leq b_i \leq 10^8)$$$ indicates the number of unordered pairs of treasures at distance $$$i$$$.
The first line should contain "YES" if there exists an example that fits the given information, or "NO" otherwise.
If the answer is "YES", the second line should contain $$$n$$$ integers $$$x_1,x_2,\dots,x_n$$$ where $$$x_i$$$ indicates the number of treasures in obelisk $$$i$$$.
If there are many solutions, you may output any of them.
63 5 2 310 26 28 14
YES 3 2 1 3 1 3
83 8 13 10 378 173 155 169 91
YES 3 2 6 5 3 5 7 6
63 5 2 410 26 28 14
NO