Beautiful Permutation

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

A permutation a_0,a_1,,a_n1a\_0, a\_1, \ldots, a\_{n - 1} of 0,1,,n10, 1, \ldots, n - 1 is said to be beautiful if the sequence b_0,,b_n1b\_0, \ldots, b\_{n - 1} defined as b_i=a_iib\_i = |a\_i - i| is also a permutation of 0,,n10, \ldots, n - 1

Given nn, construct a beautiful permutation of nn elements or determine that it does not exist.

입력

The first line contains a single integer nn (1n1061 \leq n \leq 10^6): the size of the permutation.

출력

If there is no beautiful permutation of nn elements, output a single line with the word "NO".

Otherwise, on the first line, print "YES", and on the second line, print nn space-separated integers a_0,,a_n1a\_0, \ldots, a\_{n-1}: the beautiful permutation. If there are multiple beautiful permutations, print any one of them.