Scanf.scanf "%d %d" (fun n x ->
    let d = 2 * n - 1 in
    let prt a b = for i = a to b do Printf.printf "%d\n" i done in
    if x = 1 || x = d then print_endline "No" else (
        print_endline "Yes";
        if x = n then prt 1 d else
        if x < n then (
            prt 1 (x - 2);
            prt (x + 1) n;
            prt (x - 1) x; 
            prt (n + 1) d;
        ) else (
            prt 1 (n - 1);
            prt x (x + 1);
            prt n (x - 1);
            prt (x + 2) d;
        )
    )
)