let () =
    let main () =
        let n = int_of_string (read_line ()) in
        if n <> 1 && n mod 2 = 1 then (
            print_endline "Yes";
            for i = 1 to (n - 1) / 2 do
                Printf.printf "%d %d\n" 1 (2 * i);
                Printf.printf "%d %d\n" (2 * i) (2 * i + 1);
                Printf.printf "%d %d\n" 1 (2 * i + 1 + n);
                Printf.printf "%d %d\n" (2 * i + n) (2 * i + 1 + n);
            done;
            Printf.printf "%d %d\n" 3 (n + 1)
        ) else if n > 3 && (n - 2) land (n - 3) = 0 then (
            print_endline "Yes";
            for i = 1 to (n - 4) / 2 do
                Printf.printf "%d %d\n" 1 (2 * i);
                Printf.printf "%d %d\n" (2 * i) (2 * i + 1);
                Printf.printf "%d %d\n" 1 (2 * i + 1 + n);
                Printf.printf "%d %d\n" (2 * i + n) (2 * i + 1 + n);
            done;
            Printf.printf "%d %d\n" 3 (n + 1);
            Printf.printf "%d %d\n" 3 (n + n - 1);
            Printf.printf "%d %d\n" (n + 2) (n - 2);
            Printf.printf "%d %d\n" (n - 2) (n - 1);
            Printf.printf "%d %d\n" (n - 2) n;
            Printf.printf "%d %d\n" (n + 2) (n + n);
            Printf.printf "%d %d\n" (n + n) (n + n - 2);
        ) else print_endline "No"
    in
    main ()