#include <bits/stdc++.h>
using namespace std;
ifstream fin(
    "a"
    ".in");
ofstream fout(
    "a"
    ".out");
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int sum = (n * (n + 1)) / 2;
  for (int i = 2; i < n + 1; i++) {
    if (gcd(i, sum - i) > 1) {
      cout << "Yes\n";
      cout << "1 " << i << "\n" << n - 1 << " ";
      for (int j = 1; j < n + 1; j++) {
        if (j != i) {
          cout << j << " ";
        }
      }
      return 0;
    }
  }
  cout << "No";
  return 0;
}
