#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int ans = -1;
    long long int sum = (n * n + n) / 2;
    for (long long int i = 2; i * i <= sum; i++)
      if (sum % i == 0) {
        ans = i;
        break;
      }
    if (ans == -1) {
      cout << "No";
      return 0;
    }
    cout << "Yes\n";
    cout << "1 " << ans << endl;
    cout << n - 1 << " ";
    for (long long int i = 1; i <= n; i++)
      if (i != ans) cout << i << " ";
  }
}
