Language: C++

#include <bits/stdc++.h>
uisng namespace std;
typedef vector <int> vi;

int main(){
  int N;cin>>N;
  int k=0;
  for (int i=1;i*i<=N;++i){
    if((i(i-1))/2==N){k=i;break;}
  }
  if(k==0){cout << "No"<< endl;}
  else{
    cout << "Yes" << endl;
    cout << k << endl;

    vi ans[k+1];
    int count=0:
    for (int i=1;i<k;++i){
      for (int j=i+1;j<=k;++j){
        count++;
        ans[i].push_back(count);
        ans[j].push_back(count);
      }
    }

    for (int i=1;i<=k;++i){
      cout << k-1 << ' ';
      for (int j=0;j<k-1;++j){
        cout << ans[i][j] << ' ';
      }
      cout << endl;
    }
  }

  return 0;
}

Compiler output:
a.cc:2:1: error: 'uisng' does not name a type
    2 | uisng namespace std;
      | ^~~~~
a.cc:3:9: error: 'vector' does not name a type
    3 | typedef vector <int> vi;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   int N;cin>>N;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 'i' cannot be used as a function
    9 |     if((i(i-1))/2==N){k=i;break;}
      |         ~^~~~~
a.cc:11:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   if(k==0){cout << "No"<< endl;}
      |            ^~~~
      |            std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   if(k==0){cout << "No"<< endl;}
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout << "Yes" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     cout << "Yes" << endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:5: error: 'vi' was not declared in this scope
   16 |     vi ans[k+1];
      |     ^~
a.cc:17:16: error: expected ',' or ';' before ':' token
   17 |     int count=0:
      |                ^
a.cc:18:18: error: 'i' was not declared in this scope
   18 |     for (int i=1;i<k;++i){
      |                  ^
a.cc:29:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |         cout << ans[i][j] << ' ';
      |                 ^~~
      |                 abs