fun main(arg: Array<String>) {
    val n = readLine()!!.toInt()
    fun popcount(N: Int): Int {
        var n = N
        var count = 0
        while (n > 0) {
            if ((n and 1) == 1) count++
            n = n shr 1
        }
        return count
    }
    if (popcount(n) == 1) { println( "No"); return }
    println("Yes")
    fun prt(a: Int, b: Int) = println("${a} ${b}")
    for( i in 2 until n step 2) {
        prt(i + 1, i);
        prt(i, 1);
        prt(1, i + n + 1);
        prt(i + n + 1, i + n);
    }
    prt(n + 1, 3);
    if (n % 2 == 0) {
        var k = 30
        while ((n and (1 shl k)) == 0) k--
        val s = (1 shl k) // even
        val r = (n xor s xor 1) // odd
        prt(n, s)
        prt(n + n, r + n)
    }
}
