func_code_string: #include <bits/stdc++.h>   using namespace std;   inline long long in() {     int32_t x;     scanf( %d , &x);     return x;   }   const long long maxn = 1e6 + 10;   const long long mod = 1e9 + 7;   const long long inf = 1e9 + 10;   long long dp[maxn];   long long ans[maxn];   int32_t main() {     dp[1] = 1;     for (long long i = 2; i < maxn; i++) dp[i] = dp[i / 2] * 2;     long long n = in();     if (n & 1) {       cout <<  NO n ;     } else {       long long nn = n;       while (n) {         long long maxPower = dp[n];         for (long long x = 1; x <= n - maxPower + 1; x++)           ans[maxPower - x] = maxPower + x - 1,                          ans[maxPower + x - 1] = maxPower - x;         n = 2 * maxPower - n - 2;       }       cout <<  YES n ;       for (long long i = 1; i <= nn; i++) cout << ans[i] <<    ;       cout <<   n ;       n = nn;     }     if (n <= 7) {       bool ok = false;       long long arr[7];       for (long long i = 0; i < n; i++) arr[i] = i + 1;       do {         bool fl = true;         for (long long i = 0; i < n; i++) {           if ((arr[i] & (i + 1)) && arr[i] != i + 1) continue;           fl = false;         }         if (fl) {           ok = true;           break;         }       } while (next_permutation(arr, arr + n));       if (ok) {         cout <<  YES n ;         for (long long i = 0; i < n; i++) cout << arr[i] <<    ;       } else         cout <<  NO n ;     } else {       if (__builtin_popcountll(n) == 1)         cout <<  NO n ;       else {         cout <<  YES n ;         long long arr[7];         for (long long i = 0; i < 7; i++) arr[i] = i + 1;         do {           bool fl = true;           for (long long i = 0; i < 7; i++) {             if ((arr[i] & (i + 1)) && arr[i] != i + 1) continue;             fl = false;           }           if (fl) break;         } while (next_permutation(arr, arr + 7));         for (long long i = 0; i < 7; i++) cout << arr[i] <<    ;         for (long long i = 8; i <= n; i *= 2) {           long long lim = min(2 * i - 1, n);           for (long long x = i; x <= lim; x++) {             if (x == i)               cout << lim <<    ;             else               cout << x - 1 <<    ;           }         }       }     }   }   