#include <iostream>
#include <vector>
using namespace std;

int N, c = -1, cnt; vector<int>X[10009];

int main() {
	cin >> N;
	for (int i = 1; i <= 1000; i++) {
		if (i*(i - 1) / 2 == N) { c = i; break; }
	}
	if (c == -1) {
		cout << "No" << endl;
		return 0;
	}
	for (int i = 0; i < c; i++) {
		for (int j = i + 1; j < c; j++) {
			X[i].push_back(cnt + 1);
			X[j].push_back(cnt + 1);
			cnt++;
		}
	}
	cout << "Yes" << endl;
	cout << c << endl;
	for (int i = 0; i < c; i++) {
		cout << X[i].size() << " ";
		for (int j = 0; j < X[i].size(); j++) { if (j) cout << " "; cout << X[i][j]; }
		cout << endl;
	}
	return 0;
}