#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

int main(void) {
  int64_t N;
  cin >> N;
  int64_t W = 0;
  while (W * (W + 1) < 2 * N) {
    ++W;
  }
  int64_t H = W + 1;
  if (W * H != 2 * N) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  vector<vector<int>> answer(H, vector<int>(W, -1));
  answer[0][0] = 1;
  int val = 1;
  for (int i = 0; i < W; ++i) {
    for (int j = i; j < W; ++j) {
      answer[i][j] = answer[j][i] = val++;
    }
  }
  for (int i = 0; i < W; ++i) {
    answer[H - 1][i] = answer[i][i];
  }

  cout << H << endl;
  rep(i, H) {
    cout << W;
    rep(j, W) { cout << " " << answer[i][j]; }
    cout << endl;
  }
  return 0;
}