#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  if ((n & n - 1) == 0) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  for (int i = 2; i+1 <= n; i += 2) {
    cout << i << ' ' << i+1 << endl;
    cout << i+1 << ' ' << 1 << endl;
    cout << 1 << ' ' << i+n << endl;
    cout << i+n << ' ' << i+1+n << endl;
  }
  cout << 3+n << ' ' << 1+n << endl;
  if (n % 2 == 0) {
    cout << n << ' ' << n-1 << endl;
    cout << (n^(n-1)^1)+n << ' ' << n+n << endl;
  }
}

