import java.io._
import java.util.StringTokenizer
import scala.util.control.Breaks.{breakable,break}
import scala.collection.mutable.Map
import scala.collection.mutable.Queue

object Main extends App {
  val in = new InputReader(System.in)
  val pw = new PrintWriter(System.out)

  val N = in.next().toInt

  var ans = List((1, 2), (2, 3), (N+3, 1), (N+2, N+3), (N+1, N+2))
  if (N <= 2)
    println("No")
  else {
    for (i <- 4 until N by 2) {
      ans = (i, 1) :: (i+1, i) :: (N+i+1, 1) :: (N+i, N+i+1) :: ans
    }

    var flag = false
    if (N % 2 == 0) {
      breakable {
        for (i <- 2 to N-1 if (i ^ (N+1)) < N) {
          ans = (i, N) :: (i ^ (N+1), N+N) :: ans
          flag = true
          break
        }
      }
    }
    else
      flag = true

    if(flag) {
      pw.println("Yes")
      ans.foreach { case (a, b) => pw.println(s"$a $b") }
    }
    else
      pw.println("No")

    pw.flush()
  }

}


class InputReader(stream: InputStream) {
  private val reader = new BufferedReader(new InputStreamReader(stream))
  private var tokenizer: StringTokenizer = new StringTokenizer(reader.readLine())
  def next(): String = {
    while (!tokenizer.hasMoreTokens()) {
      tokenizer = new StringTokenizer(reader.readLine())
    }
    tokenizer.nextToken()
  }
}
