#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
vector<int> adj[maxn];
int edge;
void connect(int x, int y) {
  for (int i = x; i <= y; i++)
    for (int j = x; j <= y; j++)
      if (i != j && !((i + 1 == j) && i == x) && !((j + 1 == i) && j == x))
        adj[i].push_back(j), edge++;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int k;
  cin >> k;
  if (!(k & 1)) {
    cout << "NO";
    return 0;
  }
  int cnt = 2, now = 2;
  while (cnt < k) {
    adj[1].push_back(now), adj[1].push_back(now + 1);
    adj[now].push_back(1), adj[now + 1].push_back(1);
    edge += 4;
    connect(now, now + k);
    now += (k + 1);
    cnt += 2;
  }
  cout << "YES\n";
  cout << 2 * (now - 1) << " " << edge + 1 << endl;
  for (int i = 1; i < now; i++)
    for (int j = 0; j < adj[i].size(); j++)
      if (i < adj[i][j]) cout << i << " " << adj[i][j] << endl;
  cout << 1 << " " << now << endl;
  for (int i = 1; i < now; i++)
    for (int j = 0; j < adj[i].size(); j++)
      if (i < adj[i][j])
        cout << i + now - 1 << " " << adj[i][j] + now - 1 << endl;
  return 0;
}
