{"raw_statement":[{"iden":"problem statement","content":"Given are two sequences $A$ and $B$, both of length $N$. $A$ and $B$ are each sorted in the ascending order. Check if it is possible to reorder the terms of $B$ so that for each $i$ ($1 \\leq i \\leq N$) $A_i \\neq B_i$ holds, and if it is possible, output any of the reorderings that achieve it."},{"iden":"constraints","content":"*   $1\\leq N \\leq 2 \\times 10^5$\n*   $1\\leq A_i,B_i \\leq N$\n*   $A$ and $B$ are each sorted in the ascending order.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\cdots$ $A_N$\n$B_1$ $B_2$ $\\cdots$ $B_N$"},{"iden":"sample input 1","content":"6\n1 1 1 2 2 3\n1 1 1 2 2 3"},{"iden":"sample output 1","content":"Yes\n2 2 3 1 1 1"},{"iden":"sample input 2","content":"3\n1 1 2\n1 1 3"},{"iden":"sample output 2","content":"No"},{"iden":"sample input 3","content":"4\n1 1 2 3\n1 2 3 3"},{"iden":"sample output 3","content":"Yes\n3 3 1 2"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}