#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const long long N = 1e6 + 5;
const long long MOD = 1e9 + 7;
long long dp[N], ans = 0;
void solve() {
  long long n;
  cin >> n;
  long long sum = (n * (n + 1)) / 2;
  if (n < 3) {
    cout << "No" << '\n';
    return;
  }
  if (sum % 2 == 0) {
    cout << "Yes" << '\n';
    cout << 1 << " " << 2 << '\n';
    cout << n - 1 << " " << 1 << " ";
    for (long long i = 3; i <= n; ++i) {
      cout << i << " ";
    }
    cout << '\n';
    return;
  } else {
    long long flag = 0;
    long long ans = 0;
    for (long long i = 3; i <= n; ++i) {
      if ((sum - i) % i == 0) {
        flag = 1;
        ans = i;
        break;
      }
    }
    if (flag) {
      cout << "Yes" << '\n';
      cout << 1 << " " << ans << '\n';
      cout << n - 1 << " ";
      for (long long i = 1; i <= n; ++i) {
        if (i != ans) cout << i << " ";
      }
      cout << '\n';
      return;
    }
  }
  cout << "No" << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
