#include <bits/stdc++.h>
int K;
int main() {
  scanf("%d", &K);
  if (K % 2) {
    puts("YES");
    if (K == 1) {
      puts("2 1\n1 2");
      return 0;
    }
    int i, j, N = (K << 1) + 4,
              M = (3 * K - 2 + (K - 1) * (K - 2) / 2 - K / 2) * 2 + 1,
              tmp1 = K + 1, tmp2 = K + 2;
    printf("%d %d\n", N, M);
    for (i = 1; i < K; i++)
      printf("%d %d\n%d %d\n%d %d\n%d %d\n%d %d\n%d %d\n", K, i, K + tmp2,
             i + tmp2, tmp1, i, tmp1 + tmp2, i + tmp2, tmp2, i, tmp2 << 1,
             i + tmp2);
    printf("%d %d\n%d %d\n", tmp1, tmp2, tmp1 + tmp2, tmp2 << 1);
    int lim = K - 1;
    for (i = 1, tmp1 = K >> 1; i < lim; i++)
      for (j = i + 1; j < K; j++)
        if (j != i + tmp1) printf("%d %d\n%d %d\n", i, j, i + tmp2, j + tmp2);
    printf("%d %d\n", K, K + tmp2);
  } else
    puts("NO");
  return 0;
}
