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