#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > edges;
bool valid(int n, int k) {
  priority_queue<pair<int, int> > Q;
  for (int i = 1; i < n; i++) Q.push(make_pair(k, i));
  Q.push(make_pair(k - 1, n));
  pair<int, int> u, v;
  vector<pair<int, int> > aux;
  edges.clear();
  while (!Q.empty()) {
    u = Q.top();
    Q.pop();
    int d = u.first;
    if (d == 0) break;
    for (int j = 0; j < d; j++) {
      if (Q.empty()) return false;
      v = Q.top();
      aux.push_back(v);
      Q.pop();
      edges.push_back(make_pair(u.second, v.second));
    }
    for (int j = 0; j < d; j++) {
      aux[j].first--;
      if (aux[j].first > 0) Q.push(aux[j]);
    }
    aux.clear();
  }
  return true;
}
int main() {
  int k;
  while (cin >> k) {
    bool ok = false;
    int n, m;
    if (k % 2 == 0)
      puts("NO");
    else {
      for (int i = 1; i <= 500000 && !ok; i++) {
        if (2 * i - 2 > i * k - 1) break;
        if (valid(i, k)) ok = true, n = i;
      }
      if (ok) {
        puts("YES");
        m = 2 * edges.size() + 1;
        cout << 2 * n << " " << m << endl;
        for (int i = 0; i < edges.size(); i++)
          printf("%d %d\n", edges[i].first, edges[i].second);
        for (int i = 0; i < edges.size(); i++)
          printf("%d %d\n", edges[i].first + n, edges[i].second + n);
        printf("%d %d\n", n, 2 * n);
      } else
        puts("NO");
    }
  }
}
