909_F. AND-permutations
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
```python
def test(x, i):
	i = list(i)
	ok = True
	for j in range(x):
		if (i[j] == j+1 or (i[j]&(j+1) != 0)):
			ok = False
	if ok:
		print(i)

def comp(n):
	return 2**len(bin(n)[2:])-1-n

n = int(input())
nn = n
if (n%2 == 0):
	x = []
	while (n != 0):
		#add n to comp(n) to the front of x
		for i in range(comp(n), n+1):
			x.append(i)
		n = comp(n)-1

	x.reverse()
	print("YES")
	print(' '.join([str(i) for i in x]))
else:
	print("NO")

pow2 = [2**i for i in range(20)]
def make(n):
	if n <= 5: return []
	if n == 6: return [3, 6, 1, 5, 4, 2]
	if n == 7: return [3, 6, 1, 5, 4, 7, 2]
	if n in pow2:
		return []
	shift = 2**(len(bin(n)[2:])-1)
	array = [i for i in range(shift, n+1)]
	array = array[1:] + [array[0]]
	return make(shift-1) + array

n = nn
k = make(n)
if k == []:
	print("NO")
else:
	print("YES")
	print(' '.join([str(i) for i in k]))

```