#include <bits/stdc++.h>
using namespace std;
long long k, n, m, v;
void genclique(int d) {
  for (int i = (0); i < (d); i++)
    for (int j = (i + 1); j < (d); j++)
      cout << v + j + 1 << " " << v + i + 1 << "\n";
  v += d;
}
void gengraph(int s) {
  for (int i = (0); i < (k - 1); i++) {
    cout << s << " " << s + i + 1 << "\n";
  }
  v += k - 1;
  for (int i = (0); i < ((k - 1) / 2); i++) {
    genclique(k - 1);
    for (int j = (0); j < (k - 1); j++) {
      cout << s + 2 * i + 1 << " " << v - j << "\n";
      cout << s + 2 * i + 2 << " " << v - j << "\n";
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> k) {
    if ((k & 1) == 0) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      n = (k - 1) * (k + 1) + 2, m = (n * k) / 2;
      cout << n << " " << m << "\n";
      cout << 1 << " " << n / 2 + 1 << "\n";
      v = 1;
      gengraph(1);
      v++;
      gengraph(n / 2 + 1);
    }
  }
  return 0;
}
