#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <assert.h>

using namespace std;

int main()
{
    freopen("sumsquare.in", "r", stdin);
    freopen("sumsquare.out", "w", stdout);
    int n;
    cin >> n;
    assert(1 <= n && n <= 100000);
    vector<int> ans;
    ans.clear();
    if (n % 4 != 0 || n < 8)
    {
        cout << "NO\n"; 
        return 0;
    }
    else
    {
        cout << "YES\n";
        if (n % 8 == 4)
        {
            int t = n - 12;
            ans.push_back(t);
            ans.push_back(t + 2);
            ans.push_back(t + 6);
            ans.push_back(t + 7);
            ans.push_back(t + 8);
            ans.push_back(t + 10);
            n -= 12;
        } 
        for (int i = 0; i < n / 8; i++)
        {
            int t = i * 8;
            ans.push_back(t);
            ans.push_back(t + 3);
            ans.push_back(t + 5);
            ans.push_back(t + 6);
        }
    }
    for (size_t i = 0; i < ans.size() - 1; i++)
        cout << ans[i] << " ";
    cout << ans[ans.size() - 1] << endl;
}
