#include <bits/stdc++.h>
using namespace std;
int K, T, Nodes, Edges;
bool edgeTaken[1005][1005];
int buildComponent(int startNode, int E) {
  for (int J = 1; E; J++) {
    for (int from = startNode; E && from < startNode + Nodes; from++) {
      int to = from + J;
      to -= startNode;
      to %= Nodes;
      to += startNode;
      printf("%d %d\n", from, to);
      E--;
    }
  }
  return startNode + Nodes - 1;
}
int main() {
  scanf("%d", &K);
  if (K % 2 == 0) {
    printf("NO\n");
    return 0;
  }
  if (K == 1) return printf("YES\n2 1\n1 2\n"), 0;
  Nodes = K + 2;
  T = (Nodes - 1) * K + K - 1;
  Edges = T / 2;
  printf("YES\n%d %d\n", Nodes * 2, Edges * 2 + 1);
  int bridgeNode1 = buildComponent(1, Edges);
  int bridgeNode2 = buildComponent(Nodes + 1, Edges);
  printf("%d %d\n", bridgeNode1, bridgeNode2);
}
