// In the name of God

#include <bits/stdc++.h>

using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	int k = -1;
	for(int i = 1; i < 1000; i++) {
		if( (i * (i-1)) / 2 == n) {
			k = i;
			break;
		}
	}
	if(k == -1) {
		cout << "No";
		exit(0);
	}
	cout << "Yes\n";
	vector<vector<int>> sets(k);
	int num = 1;
	for(int i = 0; i < k; i++) {
		for(int j = i + 1; j < k; j++) {
			sets[i].push_back(num);
			sets[j].push_back(num);
			num++;
		}
	}
	cout << k << "\n";
	for(int i = 0; i < k; i++) {
		cout << sets[i].size() << " ";
		for(int x : sets[i]) cout << x << " ";
		cout << "\n";
	}
	return 0;
}
