#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
const int INF = (int)1e9 + 1;
const long double EPS = 1e-9;
void precalc() {}
int k;
bool read() {
  if (scanf("%d", &k) < 1) {
    return 0;
  }
  return 1;
}
int n;
vector<pair<int, int> > edges;
void addPart(int S) {
  if (k == 1) {
    return;
  }
  for (int iter = 0; iter < 2; ++iter) {
    for (int i = 0; i < k; ++i) {
      for (int j = i + 1; j < k; ++j) {
        int s = n + i, t = n + j;
        edges.push_back(make_pair(s, t));
      }
    }
    for (int i = 0; i < (k - 1) / 2; ++i) {
      edges.push_back(make_pair(S, n + i));
    }
    n += k;
  }
  for (int i = (k - 1) / 2; i < k; ++i) {
    edges.push_back(make_pair(n - 2 * k + i, n - k + i));
  }
}
const int maxk = 100 + 10;
const int maxn = 2 + 4 * maxk;
int deg[maxn];
void solve() {
  if (!(k & 1)) {
    printf("NO\n");
    return;
  }
  edges.clear();
  n = 2;
  edges.push_back(make_pair(0, 1));
  addPart(0);
  addPart(1);
  assert(n <= maxn);
  printf("YES\n");
  printf("%d %d\n", n, ((int)(edges).size()));
  for (int i = 0; i < n; ++i) {
    deg[i] = 0;
  }
  for (int i = 0; i < ((int)(edges).size()); ++i) {
    printf("%d %d\n", edges[i].first + 1, edges[i].second + 1);
    deg[edges[i].first] += 1;
    deg[edges[i].second] += 1;
  }
  for (int i = 0; i < n; ++i) {
    assert(deg[i] == k);
  }
}
int main() {
  srand(rdtsc());
  precalc();
  while (1) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
