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


void main() {
    int n;
    scan(n);

    int m;
    int dan;

    foreach (k ; 1 .. 1000) {
        m += k;

        if (m == n) {
            dan = k + 1;
            break;
        }
        if (m > n) {
            writeln("No");
            return;
        }
    }

    debug {
        writeln(m, " ", dan);
    }

    auto ans = new int[][](dan + 2, 0);

    writeln("Yes");
    writeln(dan);
    int of;

    foreach_reverse (i ; 1 .. dan) {
        foreach (j ; 0 .. i) {
            ans[dan - i] ~= of + j + 1;
            ans[dan - i + j + 1] ~= of + j + 1;
        }
        of += i;
    }

    debug {
        writeln(ans);
    }

    foreach (ansi ; ans[1 .. $-1]) {
        writefln("%d %(%s %)", ansi.length, ansi);
    }
}




































void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
