{"raw_statement":[{"iden":"problem statement","content":"You are given a positive integer $N$ and a sequence $A = (A_0, A_1, \\ldots, A_{2^N-1})$ of $2^N$ terms, where each $A_i$ is an integer between $0$ and $2^N-1$ (inclusive) and $A_i\\neq A_j$ holds if $i\\neq j$.\nYou can perform the following two kinds of operations on $A$:\n\n*   Operation $+$: For every $i$, change $A_i$ to $(A_i + 1) \\bmod 2^N$.\n*   Operation $\\oplus$: Choose an integer $x$ between $0$ and $2^N-1$. For every $i$, change $A_i$ to $A_i\\oplus x$.\n\nHere, $\\oplus$ denotes bitwise $\\mathrm{XOR}$.\nWhat is bitwise $\\mathrm{XOR}$?The bitwise $\\mathrm{XOR}$ of non-negative integers $A$ and $B$, $A \\oplus B$, is defined as follows:\n\n*   When $A \\oplus B$ is written in base two, the digit in the $2^k$'s place ($k \\geq 0$) is $1$ if exactly one of $A$ and $B$ is $1$, and $0$ otherwise.\n\nFor example, we have $3 \\oplus 5 = 6$ (in base two: $011 \\oplus 101 = 110$).\n\n  \nYour objective is to make $A_i = i$ for every $i$. Determine whether it is achievable. It can be proved that, under the Constraints of this problem, one can achieve the objective with at most $10^6$ operations if it is achievable at all. Print such a sequence of operations."},{"iden":"constraints","content":"*   $1\\leq N\\leq 18$\n*   $0\\leq A_i \\leq 2^N - 1$\n*   $A_i\\neq A_j$, if $i\\neq j$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_0$ $A_1$ $\\ldots$ $A_{2^N - 1}$"},{"iden":"sample input 1","content":"3\n5 0 3 6 1 4 7 2"},{"iden":"sample output 1","content":"Yes\n4\n-1 6 -1 1\n\nThe sequence of operations above changes the sequence $A$ as follows.\n\n*   Initially: $A = (5,0,3,6,1,4,7,2)$\n*   Operation $+$: $A = (6,1,4,7,2,5,0,3)$\n*   Operation $\\oplus$ ($x = 6$)：$A = (0,7,2,1,4,3,6,5)$\n*   Operation $+$: $A = (1,0,3,2,5,4,7,6)$\n*   Operation $\\oplus$ ($x = 1$)：$A = (0,1,2,3,4,5,6,7)$"},{"iden":"sample input 2","content":"3\n2 5 4 3 6 1 0 7"},{"iden":"sample output 2","content":"No\n\nNo sequence of operations achieves the objective."},{"iden":"sample input 3","content":"3\n0 1 2 3 4 5 6 7"},{"iden":"sample output 3","content":"Yes\n0\n\nPerforming zero operations achieves the objective. Whether an empty line is printed or not does not affect the verdict."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}