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;
int n, p[101000];
void Solve1(int x) {
  if (x & 1) {
    puts("NO");
    return;
  }
  int i = x;
  while (i) {
    int L = 0;
    while ((1 << L) <= i) L++;
    L--;
    int j = 0;
    while ((i - j) >> L & 1) j++;
    for (int k = 1; k <= j; k++) {
      p[i - k + 1] = i - j - j + k;
      p[i - j - j + k] = i - k + 1;
    }
    i -= 2 * j;
  }
  puts("YES");
  for (int i = 1; i <= x; i++) printf("%d ", p[i]);
  puts("");
}
void Solve2(int x) {
  int L = 0;
  while ((1 << L) <= x) L++;
  L--;
  if ((1 << L) == x || x < 6) {
    puts("NO");
    return;
  }
  if (x == 6) {
    puts("YES");
    puts("3 6 2 5 1 4");
    return;
  }
  p[1] = 3;
  p[2] = 6;
  p[3] = 5;
  p[4] = 7;
  p[5] = 1;
  p[6] = 2;
  p[7] = 4;
  while ((1 << L) >= 8) {
    for (int i = 1 << L; i <= x; i++) p[i] = i == x ? (1 << L) : i + 1;
    x = (1 << L) - 1;
    L--;
  }
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", p[i]);
  puts("");
}
int main(void) {
  scanf("%d", &n);
  Solve1(n);
  Solve2(n);
  return 0;
}