#include <bits/stdc++.h>
#define int long long
using namespace std;
const int MOD=1e9+7;

signed main() {
  int N;cin>>N;int K=-1;
  for(int i=1;i<1000;i++)if(i*(i-1)/2==N)K=i;
  if(K==-1){cout<<"No"<<endl;return 0;}
  cout<<"Yes"<<endl<<K<<endl;
  std::vector<int> v[K];
  int c=1;
  for(int i=0;i<K;i++){
    for(int j=i+1;j<K;j++){
      v[i].push_back(c);
      v[j].push_back(c++);
    }
  }
  for(int i=0;i<K;i++){
    cout<<K-1;
    for(int p:v[i])cout<<" "<<p;cout<<endl;
  }
}
