#include <iostream>
#include <vector>
using namespace std;
int main() {
long long n;
cin>>n;
long long sum = (n*(n+1))/2;
vector<long long> set1;
vector<long long> set2;
vector<long long> vis(n+1,0);
long long maxElement=n;
if(sum%2 == 1)
{
cout<<"NO"<<endl;
}
else
{
cout<<"YES"<<endl;
long long set1Sum=0;
//cout<<set1Sum<<" "<<sum/2<<endl;
while(set1Sum < (sum/2))
{
if((sum/2-set1Sum) > maxElement)
{
set1.push_back(maxElement);
vis[maxElement]=1;
set1Sum+=maxElement;
maxElement--;
}
else
{
set1.push_back(sum/2-set1Sum);
vis[sum/2-set1Sum]=1;
set1Sum+=sum/2-set1Sum;
}
//cout<<set1Sum<<endl;
}
for(int i=1;i<=n;i++)
{
if(vis[i] == 0)
{
set2.push_back(i);
}
}
cout<<set1.size()<<endl;
for(int i=0;i<set1.size();i++)
{
if(i == set1.size()-1)
{
cout<<set1[i]<<endl;
}
else
{
cout<<set1[i]<<" ";
}
}
cout<<set2.size()<<endl;
for(int i=0;i<set2.size();i++)
{
if(i == set2.size()-1)
{
cout<<set2[i]<<endl;
}
else
{
cout<<set2[i]<<" ";
}
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgoJbG9uZyBsb25nIG47CgljaW4+Pm47CgkKCWxvbmcgbG9uZyBzdW0gPSAobioobisxKSkvMjsKCgl2ZWN0b3I8bG9uZyBsb25nPiBzZXQxOwoJdmVjdG9yPGxvbmcgbG9uZz4gc2V0MjsKCXZlY3Rvcjxsb25nIGxvbmc+IHZpcyhuKzEsMCk7Cglsb25nIGxvbmcgbWF4RWxlbWVudD1uOwoKCWlmKHN1bSUyID09IDEpCgl7CgkJY291dDw8Ik5PIjw8ZW5kbDsKCX0KCWVsc2UKCXsKCQljb3V0PDwiWUVTIjw8ZW5kbDsKCQlsb25nIGxvbmcgc2V0MVN1bT0wOwoJCQoJCS8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