n = gets.to_i
ok = true
20.times do |i|
    ok = false if (1<<i) == n
end
if !ok
    puts "No"
    exit
end
a = []
2.times do |i|
    a << [i+1,i+2]
end
a << [3,1+n]
a << [n+1,n+2]
a << [n+3,n+2]
i = 4
((n-3)/2).times do
    a << [i,i+1]
    a << [i+1,1+n]
    a << [1+n,i+n]
    a << [i+n,i+1+n]
    i += 2
end
if n%2 == 0
    a << [n,n^3]
    a << [2*n,2+n]
end
puts "Yes"
a.size.times do |i|
    puts "#{a[i][0]} #{a[i][1]}"
end