#include<bits/stdc++.h>
using namespace std;
int main(){
  long N;cin>>N;
  long k=0;
  while(k*(k-1)<2*N)k++;
  if(k*(k-1)>2*N){cout<<"No"<<endl;return 0;}
  vector<vector<long>>A(k,vector<long>(k));
  long l=1;
  for(long i=0;i<k;i++)for(long j=i+1;j<k;j++){
    A[i][j]=l;A[j][i]=l;l++;
  }
  vector<vector<long>>S(k);
  for(long i=0;i<k;i++)for(long j=0;j<k;j++)
    if(i!=j)S[i].push_back(A[i][j]);
  cout<<"Yes"<<endl;
  cout<<k<<endl;
  for(long i=0;i<k;i++){
    cout<<S[i].size()<<" ";
    for(long x:S[i])cout<<x<<" ";
    cout<<endl;
  }
}

