#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
template <typename T>
void printV(vector<T> v) {
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
bool isPrime(long long x) {
  int count = 0;
  for (int i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      count++;
      if (i != (x / i)) {
        count++;
      }
    }
  }
  if (count == 2 || x == 1) {
    return true;
  }
  return false;
}
void getDivisors(vector<int> &d, long long x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      d.emplace_back(i);
      if (i != (x / i)) {
        d.emplace_back(x / i);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  long long sum = (n * (n + 1)) / 2;
  if (isPrime(sum)) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
    vector<int> d;
    getDivisors(d, sum);
    sort((d).begin(), (d).end());
    cout << 1 << " " << d[0] << endl;
    cout << n - 1 << " ";
    for (int i = 1; i < n + 1; i++) {
      if (i != d[0]) {
        cout << i << " ";
      }
    }
  }
  return 0;
}
