#include <bits/stdc++.h>
using namespace std;
#pragma region macros_and_aliases
#define rep(i, n) for(long long i = 0; i < (n); i++)
#define rrep(i, n) for(long long i = (n)-1; i > -1; i--)
#define Rep(i, m, n) for(long long i = (m); i < (n); i++)
#define rRep(i, m, n) for(long long i = (n)-1; i >= (m); i--)
#define REP(i, m, n, p) for(long long i = m; i < n; i += p)
#define foa(s, v) for(auto &s : v)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pq priority_queue
#define bcnt(n) __builtin_popcountll(n)
#define endk endl
#define ednl endl
#define enld endl
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vb = vector<bool>;
using mll = map<long long, long long>;
using pll = pair<long long, long long>;
using qll = queue<long long>;
using sll = set<long long>;
using vpll = vector<pair<long long, long long>>;
template <class T = ll>
using V = vector<T>;
template <class T = ll>
using VV = V<V<T>>;
template <class T = ll>
using VVV = V<V<V<T>>>;
//昇順pq(小さい方から取り出す)
template <class T = ll>
using pqup = priority_queue<T, vector<T>, greater<T>>;
//降順pq(大きい方から取り出す)
template <class T = ll>
using pqdn = priority_queue<T>;
#define debug(var)              \
	std::cout << #var << " : "; \
	view(var)
template <typename T>
void view(T e) {
	std::cout << e << std::endl;
}
template <typename T>
void view(const std::vector<T> &v) {
	for(const auto &e : v) {
		std::cout << e << " ";
	}
	std::cout << std::endl;
}
template <typename T>
void view(const std::vector<std::vector<T>> &vv) {
	for(const auto &v : vv) {
		view(v);
	}
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
	os << p.first << " " << p.second;
	return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
	is >> p.first >> p.second;
	return is;
}
#pragma endregion

#pragma region constants

long long const limLL = 9223372036854775807;  // POW(2,63)-1 ~ 9.22e18
long long const dekai = 3e16;
const long double pi = acos(-1);
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int ddx[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int ddy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};

const int mod = 1000000007;
// const int mod = 998244353;
#pragma endregion

//////////////// vector処理系 ///////////////////////
#pragma region vector
vector<long long> vin(long long n) {  //整数n個の入力を受け取ってベクトルに突っ込んで返す
	vector<long long> v(n);
	for(long long i = 0; i < n; i++) {
		cin >> v[i];
	}
	return v;
}

//ベクトルの出力(検証済)
// vectorの中身を出力する 答えの出力に利用可能
template <class T>
void vout(vector<T> &v, bool tate = 0) {
	if(v.size() > 0) {
		for(auto it = v.begin(); it < v.end(); it++) {
			cout << *it;
			if(it != v.end() - 1) {
				if(tate)
					cout << endl;
				else
					cout << " ";
			}
		}
	}
	cout << endl;
}

template <class T>
void add(vector<T> &v, T val) {	 //ベクトルの各要素に加算
	for(auto &a : v) a += val;
	return;
}

//引数ベクトルに同一要素が複数あるとき、先頭を残し他は削除したベクトルを返す
//ベクトル長も変化する
// O(nlogn)くらい
template <class T>
vector<T> singlized(vector<T> &v) {
	set<T> s;
	vector<T> ret;
	for(auto seg : v) {
		if(!s.count(seg)) {
			ret.push_back(seg);
			s.insert(seg);
		}
	}
	return ret;
}

//配列圧縮(検証済)
//{1,36,1,3,8,-2,-92}を
//{2, 5,2,3,4, 1,  0}にする
template <class T>
vector<long long> press(vector<T> &v) {
	long long n = v.size();
	vector<long long> w(n);
	map<T, long long> m;
	for(T &p : v) m[p] = 0;
	long long i = 0;
	for(auto &p : m) {
		p.second = i;
		i++;
	}
	for(long long i = 0; i < n; i++) w.at(i) = m[v.at(i)];
	return w;
}

//配列圧縮(同順位なし)
//{1,36,1,3,8,-2,-92}を
//{2, 6,3,4,5, 1,  0}にする
template <class T>
vector<long long> ranking(vector<T> &v) {
	vector<pair<T, long long>> r;
	long long n = v.size();
	rep(i, n) r.push_back({v[i], i});
	sort(all(r));
	vll res(n);
	rep(i, n) { res[r[i].second] = i; }
	return res;
}

//着順配列
// (sortedplace(v)).[i] = i番目に小さい要素が入っている箇所
template <class T>
vector<long long> sortedplace(vector<T> &v) {
	auto w = ranking(v);
	ll n = v.size();
	vll res(n);
	rep(i, n) res[w[i]] = i;
	return res;
}

// vectorの中身を数える map<要素,個数>を返す
template <class T>
map<T, long long> countv(vector<T> v) {
	map<T, long long> m;
	for(auto &g : v) {
		if(m.count(g))
			m[g]++;
		else
			m[g] = 1;
	}
	return m;
}

// template <class T>
// ll inversion_number(vector<T> &v) {	 // vの転倒数(バブルソートで必要な交換回数)
// 	map<T, ll> m;
// 	for(auto &t : v) {
// 		m[t] = 0;
// 	}
// 	ll i = 0;
// 	for(auto &p : m) {
// 		p.second = i;
// 		i++;
// 	}
// 	vll w;
// 	for(auto &t : v) {
// 		w.push_back(m[t]);
// 	}
// 	BIT<> bit(i);
// 	ll res = 0;
// 	for(auto &n : w) {
// 		res += bit.sum(n + 1, i);
// 		bit.add(n, 1LL);
// 	}
// 	return res;
// }

template <class T>	//行列の積
vector<vector<T>> MatMul(vector<vector<T>> &a, vector<vector<T>> &b) {
	ll n, m, l;	 // a:n*m, b:m*l
	n = a.size();
	m = a[0].size();
	l = b[0].size();
	assert(a[0].size() == (ll)b.size());
	vector<vector<T>> res(n, vector<T>(l, (T)0));
	rep(i, n) rep(j, l) rep(k, m) res[i][j] += a[i][k] * b[k][j];
	return res;
}

template <class T>	//行列vのn乗
vector<vector<T>> MatPow(vector<vector<T>> v, long long k) {
	assert(v.size() == v[0].size());
	ll n = (ll)v.size();
	vector<vector<T>> res(n, vector<T>(n));
	rep(i, n) rep(j, n) res[i][j] = (i == j ? (T)1 : (T)0);
	while(k > 0) {
		if(k & 1) res = MatMul(res, v);
		v = MatMul(v, v);
		k /= 2;
	}
	return res;
}

template <class T>	// WarshallFloyd
void warshall(vector<vector<T>> &v) {
	ll n = v.size();
	rep(i, n) rep(j, n) rep(k, n) v[j][k] = min(v[j][k], v[j][i] + v[i][k]);
	return;
}

#pragma endregion

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	// cout << fixed << setprecision(15);
	ll n;
	cin >> n;
	ll k = 0;
	rep(i, n * 10) {
		if(i * (i - 1) / 2 == n) {
			k = i;
			break;
		}
	}
	// if(n == 1) {
	// 	cout << "Yes" << endl;
	// 	cout << 2 << endl;
	// 	cout << "1 1" << endl;
	// 	cout << "1 1" << endl;
	// 	return 0;
	// }
	if(k == 0) {
		cout << "No" << endl;
		return 0;
	}
	cout << "Yes" << endl;
	vvll ans(k);
	ll cnt = 1;
	rep(i, k) {
		Rep(j, i + 1, k) {
			ans[i].push_back(cnt);
			ans[j].push_back(cnt);
			cnt++;
		}
	}
	cout << k << endl;
	rep(i, k) {
		cout << k - 1 << " ";
		vout(ans[i]);
	}
}

Measured memory_bytes: 4944