#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  if (n % 2 == 0) {
    puts("NO");
    return 0;
  }
  puts("YES");
  if (n == 1) {
    printf("2 1\n1 2\n");
    return 0;
  }
  printf("%d %d\n", 4 * n - 2, n * n * 2 - n);
  for (int i = n + 1; i <= n + n - 1; i++)
    for (int j = 1; j <= n; j++) printf("%d %d\n", i, j);
  for (int i = 1; i < n; i += 2) printf("%d %d\n", i, i + 1);
  for (int i = n + n + n; i <= 4 * n - 2; i++)
    for (int j = n + n; j <= n + n + n - 1; j++) printf("%d %d\n", i, j);
  for (int i = n + n + 1; i <= n + n + n - 1; i += 2)
    printf("%d %d\n", i, i + 1);
  printf("%d %d\n", n, n + n);
}
