#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
void ou(const vector<pair<int, int>>& vs) {
  for (auto v : vs) {
    cout << v.first << ' ' << v.second << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  int now = 1;
  while (now < N) now *= 2;
  if (now == N) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
    vector<pair<int, int>> vs;
    if (N % 2) {
      for (int i = 2; i < N; i += 2) {
        int a = i;
        int b = i + 1;
        vs.emplace_back(1, a);
        vs.emplace_back(a, b);
        vs.emplace_back(1, b + N);
        vs.emplace_back(a + N, b + N);
      }
      vs.emplace_back(3, 1 + N);
    } else {
      int num = N;
      int need = N ^ (N - 1);
      int amemo = -1;
      for (int i = 2; i < N - 1; i += 2) {
        int a = i;
        int b = i + 1;
        if (b == need) swap(a, b);
        if (i == 2) amemo = b;
        vs.emplace_back(1, a);
        vs.emplace_back(a, b);
        vs.emplace_back(1, b + N);
        vs.emplace_back(a + N, b + N);
      }
      vs.emplace_back(amemo, 1 + N);
      vs.emplace_back(N - 2, N);
      vs.emplace_back(need, 2 * N);
    }
    ou(vs);
  }
  return 0;
}
