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 PYTHON):

Solution:
from itertools import permutations

# for i in xrange(1,12):
# 	for p in permutations(range(1,i+1)):
# 		bad1 = False
# 		bad2 = False
# 		for j in range(i):
# 			if (j+1) == p[j] or ((j+1)&p[j]) != 0:
# 				bad1 = True
# 			if (j+1) == p[j] or ((j+1)&p[j]) == 0:
# 				bad2 = True
		# if not bad1:
		# 	print "A: ",i,p
		# if not bad2:
		# 	print "B: ",i,p


n = int(raw_input())

x = n+2

if n % 2 == 0:
	print "YES"
	ans = [0 for __ in xrange(n)]
	big = n
	while big > 0:
		x = len(bin(big))-2
		small = (1 << x) - big - 1
		for i in range(small, big+1):
			ans[i-1] = big + small - i
		big = small - 1
	print " ".join(map(str,ans))
else:
	print "NO"

if n <= 5 or (n & (n - 1)) == 0:
	print "NO"
else:
	x = len(bin(n)) - 2
	import random
	import sys
	itts = 0
	while itts <= 100:
		itts += 1
		buckets = [[] for __ in xrange(x)]
		for i in range(1,n+1):
			s = [j for j in range(x) if ((i >> j) & 1) == 1]
			buckets[random.choice(s)].append(i)
		if all(len(g) > 1 for g in buckets):
			ans = [0 for __ in xrange(n)]
			for b in buckets:
				for i in range(len(b)):
					ans[b[i]-1] = b[i-1]
			print "YES"
			print " ".join(map(str,ans))
			sys.exit(0)
	print "NO"