#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n;
  if (n <= 2) {
    cout << "No" << endl;
    return 0;
  }
  long long sum = (n * (n + 1)) / 2, a = 0, b = 0;
  for (int i = 2; i * i <= sum; i++) {
    if (sum % i == 0) {
      a = i;
      break;
    }
  }
  if (a == 0)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    long long tm = (sum / a);
    vector<int> v1;
    vector<int> v2;
    for (int i = n; i >= 1; i--) {
      if (tm > 0 && i <= tm) {
        tm -= i;
        v1.push_back(i);
      } else
        v2.push_back(i);
    }
    cout << v1.size() << ' ';
    for (int i = 0; i < v1.size(); i++) cout << v1[i] << ' ';
    cout << endl;
    cout << v2.size() << ' ';
    for (int i = 0; i < v2.size(); i++) cout << v2[i] << ' ';
    cout << endl;
  }
  return 0;
}
