def pp(a,b)
  puts [a,b].join(" ")
end

n = gets.to_i
k = Math.log2(n)
if n == 1 || k == k.to_i
  puts "No"
  exit
end

puts "Yes"
pp(1,2)
pp(2,3)
pp(3,n+1)
pp(n+1,n+2)
pp(n+2,n+3)

((n-3)/2).times do |i|
  t = i*2
  pp(t+4,t+5)
  pp(t+5,1)
  pp(1,n+t+4)
  pp(n+t+4,n+t+5)
end

if n % 2 == 0
  t = 2**k.to_i
  pp(n,n+t)
  pp(n-t+1,2*n)
end