Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

F. AND-permutations

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputGiven an integer *N*, find two permutations:

- Permutation
*p*of numbers from 1 to*N*such that*p*_{i}≠*i*and*p*_{i}&*i*= 0 for all*i*= 1, 2, ...,*N*. - Permutation
*q*of numbers from 1 to*N*such that*q*_{i}≠*i*and*q*_{i}&*i*≠ 0 for all*i*= 1, 2, ...,*N*.

& is the bitwise AND operation.

Input

The input consists of one line containing a single integer *N* (1 ≤ *N* ≤ 10^{5}).

Output

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.

Examples

Input

3

Output

NO

NO

Input

6

Output

YES

6 5 4 3 2 1

YES

3 6 2 5 1 4

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/19/2019 12:03:19 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|