#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;



int main()
{
    #define int long long
    #define size_t unsigned long long
    //cerr << sizeof(size_t);
    //cerr << sizeof(unsigned long long);
    freopen("sumsquare.in", "r", stdin);
    freopen("sumsquare.out", "w", stdout);
    int ch;
    cin >> ch;
    vector<int> ans;
    vector<int> sq;
    for (int i = 0; i < ch; i++)
        sq.push_back(i * i);
    for (size_t n = 0; n < (((size_t)1) << ch); ++n)
    {
        ans.clear();

        int sum1 = 0, sum2 = 0; 
        int kol = 0;
        int sq1 = 0, sq2 = 0;
        for (int i = 0; i < ch; i++)
        {
            if (n & (((size_t)1) << i)) 
            {
                sum1 += i;
                sq1 += sq[i];
                kol++;
                ans.push_back(i);
            }
            else
            {
                sum2 += i;
                sq2 += sq[i];
            }
        }
        if (sum1 == sum2 && sq1 == sq2)
        {
            cout << "YES\n";
            for (size_t i = 0; i < ans.size(); i++)
                cout << ans[i] << " ";
            cout << endl;
            return 0;
        }
    }
    cout << "NO\n";
    
}
