Problem: Given an integer N, find two permutations:

  1. Permutation p of numbers from 1 to N such that pi ≠ i and pi & i = 0 for all i = 1, 2, ..., N. 
  2. Permutation q of numbers from 1 to N such that qi ≠ i and qi & i ≠ 0 for all i = 1, 2, ..., N. 



& is the [bitwise AND operation](https://en.wikipedia.org/wiki/Bitwise_operation#AND).

Input

The input consists of one line containing a single integer N (1 ≤ N ≤ 105).

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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int a = 0;
  char c = getchar();
  bool f = 0;
  while (!isdigit(c)) {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (isdigit(c)) {
    a = (a << 3) + (a << 1) + (c ^ '0');
    c = getchar();
  }
  return f ? -a : a;
}
int num1[100010];
int main() {
  int N = read();
  if (N & 1)
    puts("NO");
  else {
    printf("YES");
    for (int i = 1; i <= N; ++i) num1[i] = i;
    for (int i = log2(N); i; --i)
      for (int j = 1 << i; num1[j] == j; ++j)
        swap(num1[j], num1[(1 << (i + 1)) - 1 - j]);
    for (int i = 1; i <= N; ++i) printf(" %d", num1[i]);
  }
  putchar('\n');
  if (!(N & 1) || N >= 7) {
    for (int i = 1; i <= N; ++i) num1[i] = i;
    for (int i = 2; i < N; i += 2) swap(num1[i], num1[i + 1]);
    if (N & 1) {
      num1[1] = 5;
      num1[5] = 7;
      num1[7] = 1;
      num1[6] = 4;
      num1[4] = 6;
    } else {
      if (1 << (int)log2(N) == N) {
        puts("NO");
        return 0;
      } else {
        num1[N] = N - 2;
        num1[N - 2] = N;
        num1[N - 1] = 1;
        num1[1] = N - 1;
      }
    }
    printf("YES");
    for (int i = 1; i <= N; ++i) printf(" %d", num1[i]);
  } else
    puts("NO");
  return 0;
}