#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  if ((n & (n - 1)) == 0) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  cout << 1 << " " << 2 << endl;
  cout << 1 << " " << 3 << endl;
  cout << 2 << " " << n + 3 << endl;
  cout << 3 << " " << n + 2 << endl;
  cout << n + 1 << " " << n + 2 << endl;
  if (n == 3) {
    return 0;
  }
  for (long long int i = 4; i < n; i += 2) {
    long long int x = i, y = i + 1;
    cout << 1 << " " << x << endl;
    cout << 1 << " " << y << endl;
    cout << x << " " << n + y << endl;
    cout << y << " " << n + x << endl;
  }
  if (n % 2 == 0) {
    long long int x = 1;
    while (x < n) {
      x <<= 1;
    }
    x >>= 1;
    long long int x1 = 1 ^ x ^ n;
    cout << x << " " << n << endl;
    cout << x1 << " " << n * 2 << endl;
  }
  return 0;
}
