#include <bits/stdc++.h>
using namespace std;
int k, curk;
vector<pair<int, int> > res;
void graph(int root) {
  int i, j, l = k - 1, x;
  for (i = root + 1; i <= k + root - 1; i++) res.push_back(make_pair(root, i));
  for (i = root + 1; i <= root + k - 1; i++)
    for (j = k + root, x = 0; x < l; j++, x++) res.push_back(make_pair(i, j));
  for (i = k + root, x = 0; x < l / 2; x++, i += 2)
    res.push_back(make_pair(i, i + 1));
  curk = i;
}
int main() {
  int i;
  scanf("%d", &k);
  curk = k;
  if (k % 2 == 0) {
    cout << "NO";
    return 0;
  }
  if (k == 1) {
    cout << "YES\n2 1\n1 2";
    return 0;
  }
  graph(1);
  res.push_back(make_pair(1, curk));
  graph(curk);
  cout << "YES\n";
  cout << 2 * (k + k - 1) << " " << res.size() << endl;
  for (i = 0; i < res.size(); i++)
    cout << res[i].first << " " << res[i].second << endl;
  return 0;
}
