#include <bits/stdc++.h>
using namespace std;
int n;
bool visited[1000000];
int main() {
  scanf("%d", &n);
  bool valid = true;
  if ((n & (-n)) == n) valid = false;
  if (valid) {
    printf("Yes\n");
    int l = 1, r = 1;
    if (n % 2 == 0) {
      int LS = (n & (-n));
      visited[LS] = visited[LS + 1] = visited[n - LS] = visited[n - LS + 1] =
          true;
      printf("%d %d\n", LS + 1, LS);
      printf("%d %d\n", LS, n - LS);
      printf("%d %d\n", n - LS, n - LS + 1);
      printf("%d %d\n", n - LS + 1, 1);
      printf("%d %d\n", 1, n + (n - LS));
      printf("%d %d\n", n + (n - LS), n + (n - LS + 1));
      printf("%d %d\n", n + (n - LS + 1), n + (LS + 1));
      printf("%d %d\n", n + (LS + 1), n + LS);
      l = LS + 1, r = n + LS;
      visited[n] = true;
      printf("%d %d\n", n, LS);
      printf("%d %d\n", n + n, n - LS);
      printf("%d %d\n", n + 1, n - LS);
    }
    for (int i = 2; i < n; i += 2)
      if (!visited[i]) {
        assert(!visited[i + 1]);
        visited[i] = visited[i + 1] = true;
        printf("%d %d\n", i, i + 1);
        printf("%d %d\n", i + 1, l);
        printf("%d %d\n", r, n + i);
        printf("%d %d\n", n + i, n + i + 1);
        l = i, r = n + i + 1;
      }
    if (n % 2 == 1) {
      printf("%d %d\n", n + 1, 2);
    }
  } else {
    printf("No\n");
  }
}
