#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n;
int main() {
  scanf("%d", &n);
  if (n == 3) {
    puts("Yes");
    for (register int i = 1; i <= 6; ++i) printf("%d ", i);
    printf("\n");
    return 0;
  }
  int num = 1, k = 0;
  while (num <= n) num <<= 1, ++k;
  num >>= 1;
  --k;
  if (num == n) return puts("No"), 0;
  puts("Yes");
  for (register int i = 1; i <= num - 2; ++i) printf("%d %d\n", i, i + 1);
  printf("%d %d\n", num - 1, 1 + n);
  for (register int i = 2; i <= num - 2; ++i)
    printf("%d %d\n", i + n, i + 1 + n);
  printf("%d %d\n", num, 1);
  printf("%d %d\n", num + 1, num);
  printf("%d %d\n", num + 1 + n, 1);
  printf("%d %d\n", num + 1 + n, num + n);
  for (register int i = num + 2; i <= n; ++i)
    printf("%d %d\n%d %d\n", i, i - 1 + n, i + n, i - num);
  return 0;
}
