#include <bits/stdc++.h>
using namespace std;
int e[311][311];
int n, np, deg[311];
int main() {
  scanf("%d", &n);
  if (n % 2 == 0)
    puts("NO");
  else if (n == 1) {
    puts("YES");
    printf("%d %d\n%d %d\n", 2, 1, 1, 2);
  } else {
    puts("YES");
    memset(e, 0, sizeof(e));
    for (int i = 1; i <= n + 1; i++)
      for (int j = 1; j <= n + 1; j++)
        if (i < j) e[i][j] = 1;
    for (int i = n + 2; i <= n * 2 + 2; i++)
      for (int j = n + 1; j <= n * 2 + 2; j++)
        if (i < j) e[i][j] = 1;
    if (n % 2) {
      int b1 = n * 2 + 3, b2 = n * 2 + 4;
      for (int i = 1; i <= n / 2; i++) {
        e[i * 2 - 1][i * 2] = 0;
        e[i * 2 - 1][b1] = 1;
        e[i * 2][b1] = 1;
        e[n + i * 2][n + i * 2 + 1] = 0;
        e[n + i * 2][b2] = 1;
        e[n + i * 2 + 1][b2] = 1;
      }
      e[b1][b2] = 1;
      np = n * 2 + 4;
    }
    if (n % 2 == 0) {
      int l = n / 2, r = n / 2, b = n * 2 + 3;
      if (l % 2) l--, r++;
      for (int i = 1; i <= l / 2; i++) {
        e[i * 2 - 1][i * 2] = 0;
        e[i * 2 - 1][b] = 1;
        e[i * 2][b] = 1;
      }
      for (int i = 1; i <= r / 2; i++) {
        e[n + i * 2][n + i * 2 + 1] = 0;
        e[n + i * 2][b] = 1;
        e[n + i * 2 + 1][b] = 1;
      }
      np = n * 2 + 3;
    }
    printf("%d %d\n", np, n * np / 2);
    int cnt = 0;
    for (int i = 1; i <= np; i++)
      for (int j = 1; j <= np; j++)
        if (e[i][j]) {
          cout << i << " " << j << endl;
          deg[i]++;
          deg[j]++;
          cnt++;
        }
  }
}
