#include<bits/stdc++.h>
using namespace std;

signed main(){

  int n; cin >> n;
  int k = -1;
  for(int i = 1; i < 10000; i++){
    if(i*(i-1)/2 == n) k = i;
  }
  if(k == -1){
    cout << "No" << endl;
    return 0;
  }

  int r = 1;
  vector< vector<int> > v(2*n);
  for(int i = 0; i < k; i++){
    for(int j = i+1; j < k; j++){
      v[i].push_back(r);
      v[j].push_back(r);
      r++;
    }
  }

  cout << "Yes" << '\n' << k << endl;
  for(int i = 0; i < k; i++){
    cout << k-1 << " ";
    for(int j = 0; j < k-1; j++){
      cout << v[i][j] << " ";
    }
    cout << endl;
  }

  return 0;
}
