H. Obelisks
time limit per test
6 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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!"

Input

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$$$.

Output

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.

Examples
Input
6
3 5 2 3
10 26 28 14
Output
YES
3 2 1 3 1 3 
Input
8
3 8 13 10 3
78 173 155 169 91
Output
YES
3 2 6 5 3 5 7 6 
Input
6
3 5 2 4
10 26 28 14
Output
NO