#include <bits/stdc++.h>
using namespace std;
int s[1000006], d[1000006], k, j = 1;
void gen(int l, int m) {
  int x, y, c = (k - 1) / 2;
  for (x = l; x < m; x++) {
    for (y = x + 1; y < m; y++) {
      if (x % 2 == 1 && y == x + 1 && c > 0) continue;
      s[j] = x;
      d[j] = y;
      j++;
    }
    if (c > 0 && x % 2 == 1) {
      s[j] = x;
      d[j] = m;
      j++;
      s[j] = x + 1;
      d[j] = m;
      j++;
      c--;
    }
  }
}
int main() {
  cin >> k;
  if (k == 1) {
    cout << "YES" << endl;
    cout << "2 1" << endl;
    cout << "1 2" << endl;
  } else if (k % 2 == 0)
    cout << "NO" << endl;
  else {
    gen(1, k + 2);
    gen(k + 3, 2 * k + 4);
    s[j] = k + 2;
    d[j] = 2 * k + 4;
    cout << "YES" << endl;
    cout << 2 * k + 4 << " " << j << endl;
    for (int i = 1; i <= j; i++) cout << s[i] << " " << d[i] << endl;
  }
  return 0;
}
