#include <bits/stdc++.h>
using namespace std;
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
double area(double x1, double y1, double x2, double y2, double x3, double y3) {
  double a = dist(x1, y1, x2, y2), b = dist(x1, y1, x3, y3),
         c = dist(x2, y2, x3, y3);
  double p = (a + b + c) / 2;
  return sqrt(p * (p - a) * (p - b) * (p - c));
}
int main() {
  int k;
  cin >> k;
  if (k == 1) return cout << "YES\n2 1\n2 1", 0;
  if (k % 2 == 0) return cout << "NO", 0;
  cout << "YES\n";
  cout << 2 * (1 + (k - 1) * 2) << ' '
       << 2 * (2 * (k - 1) + (k - 1) / 2 + (k - 2) * (k - 1)) + 1 << endl;
  for (int i = 2; i <= k; i++) cout << "1 " << i << '\n';
  for (int i = k + 1; i < k + k - 1; i += 2) cout << i << ' ' << i + 1 << '\n';
  for (int i = 2; i <= k; i++)
    for (int j = k + 1; j <= k + k - 1; j++) cout << i << ' ' << j << '\n';
  cout << 1 << ' ' << (k - 1) * 2 + 2 << endl;
  int n = (k - 1) * 2 + 1;
  for (int i = 2; i <= k; i++) cout << 1 + n << ' ' << i + n << '\n';
  for (int i = k + 1; i < k + k - 1; i += 2)
    cout << i + n << ' ' << i + 1 + n << '\n';
  for (int i = 2; i <= k; i++)
    for (int j = k + 1; j <= k + k - 1; j++)
      cout << i + n << ' ' << j + n << '\n';
}
