{"raw_statement":[{"iden":"statement","content":"Given an integer _N_, find two permutations:\n\n1.  Permutation _p_ of numbers from 1 to _N_ such that _p__i_ ≠ _i_ and _p__i_ & _i_ = 0 for all _i_ = 1, 2, ..., _N_.\n2.  Permutation _q_ of numbers from 1 to _N_ such that _q__i_ ≠ _i_ and _q__i_ & _i_ ≠ 0 for all _i_ = 1, 2, ..., _N_.\n\n& is the [bitwise AND operation](https://en.wikipedia.org/wiki/Bitwise_operation#AND)."},{"iden":"input","content":"The input consists of one line containing a single integer _N_ (1 ≤ _N_ ≤ 105)."},{"iden":"output","content":"For each subtask, if the required permutation doesn't exist, output a single line containing the word \"_NO_\"; otherwise output the word \"_YES_\" in the first line and _N_ elements of the permutation, separated by spaces, in the second line. If there are several possible permutations in a subtask, output any of them."},{"iden":"examples","content":"Input\n\n3\n\nOutput\n\nNO\nNO\n\nInput\n\n6\n\nOutput\n\nYES\n6 5 4 3 2 1 \nYES\n3 6 2 5 1 4"}],"translated_statement":[{"iden":"statement","content":"给定一个整数 $N$，找到两个排列：\n\n$\\&$ 是按位与运算。\n\n输入包含一行，包含一个整数 $N$（$1 ≤ N ≤ 10^5$）。\n\n对于每个子任务，如果所需的排列不存在，则输出一行包含单词 \"_NO_\"；否则在第一行输出单词 \"_YES_\"，并在第二行输出排列的 $N$ 个元素，元素之间用空格分隔。如果某个子任务存在多个可能的排列，输出任意一个即可。\n\n"},{"iden":"input","content":"输入包含一行，包含一个整数 $N$（$1 ≤ N ≤ 10^5$）。"},{"iden":"output","content":"对于每个子任务，如果所需的排列不存在，则输出一行包含单词 \"_NO_\"；否则在第一行输出单词 \"_YES_\"，并在第二行输出排列的 $N$ 个元素，元素之间用空格分隔。如果某个子任务存在多个可能的排列，输出任意一个即可。"},{"iden":"examples","content":"输入\n3\n输出\nNO\nNO\n输入\n6\n输出\nYES\n6 5 4 3 2 1\nYES\n3 6 2 5 1 4"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N \\in \\mathbb{Z} $ with $ 1 \\leq N \\leq 10^5 $.  \nLet $ P = (p_1, p_2, \\dots, p_N) $ be a permutation of $ \\{1, 2, \\dots, N\\} $.  \n\n**Constraints**  \nFind two permutations $ P_1 $ and $ P_2 $ of $ \\{1, 2, \\dots, N\\} $ such that:  \n$$ p_{1,i} \\& p_{2,i} = c_i \\quad \\text{for all } i \\in \\{1, \\dots, N\\} $$  \nfor some specified sequence $ c = (c_1, \\dots, c_N) $ — **but no such $ c $ is provided in the input**.  \n\n**Objective**  \nGiven only $ N $, output:  \n- \"_NO_\" if no pair of permutations $ (P_1, P_2) $ exists satisfying an implicit condition (unspecified).  \n- \"_YES_\" followed by any valid $ P_1 $ and $ P_2 $ if such a pair exists.  \n\n**Note**: The problem statement is incomplete — the target bitwise AND values $ c_i $ are not given. Without them, the condition is ill-defined.","simple_statement":null,"has_page_source":false}