#include using namespace std; typedef long long int ll; // these are minimal values which got AC const ll ROWS = 18; const ll ITERS = 36; // max 42 int main(int argc, char **argv){ ll N; cin >> N; vector a(2*ITERS+4,0), b; a[a.size()/2]=1; // print initial rows to the output cout << ROWS*a.size() << endl; for(ll y=0; y<2*ROWS; y+=2){ for(ll x=0; x>> n; for(ll y=0; y<2*ROWS; y+=2){ for(ll x=0; x> res; for(auto &e : n){ if(e.first <= N){ N-=e.first; res.push_back(e.second); } } if(N!=0) assert(N==0); cout << res.size() << ' ' << ITERS << endl; for(auto &p : res){ cout << p.first << ' ' << p.second << endl; } return 0; }