import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9 + 7;

void main() {
    auto N = readln.chomp.to!long;

    if (N <= 2) {
        writeln("No");
        return;
    }

    long S = N * (N - 1) / 2;
    foreach_reverse (i; 2..N+1) {
        if (gcd(S-i, i) > 1) {
            writeln("Yes");
            writeln(1, " ", i);
            write(N-1);
            foreach (j; 1..N+1) if (j != i) write(" ", j);
            writeln;
            return;
        }
    }

    writeln("No");
}
