#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << "No";
    return 0;
  }
  if (n % 2 == 1) {
    cout << "Yes" << endl;
    cout << n / 2 << " ";
    for (int i = 2; i < n; i += 2) cout << i << " ";
    cout << endl;
    cout << n / 2 + 1 << " ";
    for (int i = 1; i <= n; i += 2) cout << i << " ";
  } else {
    if ((n / 2) % 2 == 1) {
      cout << "Yes" << endl;
      int sum = (n * (n + 1)) / 2;
      int p = 1;
      for (int i = 2; i <= n; i++) {
        p += i;
        if (gcd(p, sum - p) != 1) {
          cout << i << " ";
          for (int j = 1; j <= i; j++) cout << j << " ";
          cout << endl;
          cout << n - i << " ";
          for (int j = i + 1; j <= n; j++) cout << j << " ";
          break;
        }
      }
      return 0;
    }
    cout << "Yes" << endl;
    cout << n / 2 << " ";
    for (int i = 2; i <= n; i += 2) cout << i << " ";
    cout << endl;
    cout << n / 2 << " ";
    for (int i = 1; i < n; i += 2) cout << i << " ";
  }
  return 0;
}
