#include <bits/stdc++.h>
using namespace std;
int get_sum(int n) { return ((n) * (n + 1)) / 2; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int m = get_sum(n);
  int i = 2;
  while (i < m) {
    if (m % i == 0) {
      break;
    }
    i++;
  }
  if (i >= m) {
    cout << "No\n";
    return 0;
  }
  vector<int> ans1, ans2;
  vector<bool> get_ans(n + 1, false);
  if (i <= n) {
    ans1.push_back(i);
    get_ans[i] = true;
  } else {
    int ans = 0;
    for (int j = n; j > 0; j--) {
      if (ans + j <= i) {
        ans1.push_back(j);
        get_ans[j] = true;
        ans += j;
      }
    }
  }
  for (int j = 1; j <= n; j++) {
    if (!get_ans[j]) ans2.push_back(j);
  }
  cout << "Yes\n";
  cout << ans1.size() << " ";
  for (int i = 0; i < ans1.size(); i++) {
    cout << ans1[i] << " ";
  }
  cout << "\n";
  cout << ans2.size() << " ";
  for (int i = 0; i < ans2.size(); i++) {
    cout << ans2[i] << " ";
  }
}
