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

using namespace std;

int main()
{
    #define int long long
    #define size_t unsigned long long
    freopen("sumsquare.in", "r", stdin);
    freopen("sumsquare.out", "w", stdout);
    int ch;
    cin >> ch;
    vector<int> ans, ans2;
    vector<int> sq;
    for (int i = 0; i < ch + 1; i++)
        sq.push_back(i * i);
    
    int sum1 = 0, sum2 = 0; 
    int sq1 = 0, sq2 = 0;
    while (ch > 0)
    {
        ch--;
        if (sq1 > sq2)
        {
            sq2 += sq[ch];
            sum2 += ch;
            ans.push_back(ch);
        }
        else
        {
            sq1 += sq[ch];
            sum1 += ch;
        }
    } 
    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";
    
}
