#include <bits/stdc++.h>
using namespace std;
const int N = 1000006;
long long f(long long val) {
  for (long long i = 2; i * i <= val; i++)
    if (val % i == 0) return i;
  return -1;
}
int vis[N];
int main() {
  long long n;
  scanf("%lld", &n);
  long long g = f(n * (n + 1) / 2);
  if (g == -1) return printf("No\n"), 0;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    sum = (sum + i) % g;
    if (vis[sum]) {
      printf("Yes\n");
      printf("%d", i - vis[sum]);
      for (int j = vis[sum] + 1; j <= i; j++) printf(" %d", j);
      printf("\n");
      printf("%d", (int)n - (i - vis[sum]));
      for (int j = 1; j <= vis[sum]; j++) printf(" %d", j);
      for (int j = i + 1; j <= n; j++) printf(" %d", j);
      printf("\n");
      return 0;
    }
    vis[sum] = i;
  }
  printf("No\n");
}
