#include <bits/stdc++.h>
using namespace std;
bool g[256][256];
int buildGraph(int k) {
  int n;
  if (k % 2 == 0) return 0;
  if (k == 1) {
    g[1][2] = true;
    g[2][1] = true;
    return 2;
  }
  n = k + 2;
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (i == 1 && j == n) continue;
      if (i + j == n + 2) continue;
      g[i][j] = true;
      g[j][i] = true;
      g[i + n][j + n] = true;
      g[j + n][i + n] = true;
    }
  }
  g[n][n + n] = true;
  g[n + n][n] = true;
  return n + n;
}
bool checkGraph(int n, int k) {
  for (int i = 1; i <= n; ++i) {
    int d = 0;
    for (int j = 1; j <= n; ++j) d += g[i][j];
    if (d != k) return false;
  }
  return true;
}
int main(int argc, char* argv[]) {
  int k;
  scanf("%d", &k);
  int n = buildGraph(k);
  if (n == 0) {
    puts("NO");
    return 0;
  }
  int m = n * k / 2;
  printf("YES\n");
  printf("%d %d\n", n, m);
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (g[i][j]) {
        printf("%d %d\n", i, j);
      }
    }
  }
  return 0;
}
