#include <bits/stdc++.h>
using namespace std;
int n;
void print(int add) {
  for (int i = 1; i < n; ++i) {
    cout << add + 1 << " " << i + add + 1 << endl;
  }
  for (int i = 1; i < n; ++i) {
    for (int j = n; j < n + n - 1; ++j) {
      cout << i + add + 1 << " " << j + add + 1 << endl;
    }
  }
  for (int i = n; i < n + n - 1; i += 2) {
    cout << i + add + 1 << " " << i + add + 1 + 1 << endl;
  }
}
int main() {
  cin >> n;
  if (n % 2 == 0) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  cout << (n + n - 1) * 2 << " " << (n + n - 1) * n << endl;
  print(0);
  print(n + n - 1);
  cout << 0 + 1 << " " << n + n - 1 + 1 << endl;
  return 0;
}
