#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)n; i++)

int main(){
  int n;
  cin >> n;
  int N = 2*n;
  int k;
  bool can = false;
  for(int i = 1; i*i <= N; i++){
    if(i*(i+1) == N) {
      can = true;
      k = i+1;
    }
  }
  if(!can){
    cout << "No" << endl;
    return 0;
  }
  vector<int> a[k];
  int pos = 1;
  rep(i, k){
    for(int j = i + 1; j < k; j++){
      a[i].push_back(pos);
      a[j].push_back(pos);
      pos++;
    }
  }
  cout << "Yes" << endl;
  cout << k << endl;
  rep(i,k){
    cout << k - 1 << " ";
    rep(j, a[i].size()){
      cout << a[i][j];
      cout << " ";
    }
    cout << endl;
  }
  return 0;
}
