#include <bits/stdc++.h>
using namespace std;
long long n, k, w, sum;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  if (n < 3) {
    cout << "No";
    return 0;
  }
  sum = (n * (n + 1)) / 2;
  for (int i = 2; i * i <= sum; ++i) {
    if (sum % i == 0) {
      cout << "Yes\n";
      cout << 1 << " " << i << "\n";
      cout << n - 1 << " ";
      for (int j = 1; j <= n; ++j) {
        if (j != i) cout << j << " ";
      }
      return 0;
    }
  }
  cout << "No";
  return 0;
}
