#include using namespace std; #ifdef DBG #include "../icecream.hpp" #else #define IC(...) {}; #endif using ll = long long; using vll = vector; using vvll = vector; using pll = pair; using vpll = vector; using vvpll = vector; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #ifdef DBG icecream::ic.line_wrap_width(240); #endif ll n; cin >> n; vll s{ 315544068167601787, 309646574552065335, 292599319121570838, 266223123684174787, 233197800847572015, 196619119300909188, 159529498514677213, 124518979677018459, 93464693473302528, 67435204205795218, 46744666526943294, 31112189218088472, 19869828389850634, 12167372258235954, 7137915606960372, 4007793707716474, 2151472446513858, 1102919461445958, 539197112723464, 251011726254978, 111083331666918, 46642798196020, 18542369500902, 6961907072718, 2461847918140, 817283798877, 253778827695, 73389752488, 19665693177, 4853494425, 1095236038, 223969473, 41043249, 6644053, 932178, 110409, 10621, 780, 39, 1 }; IC(s[0]); ll m = 50; cout << m*(2*m+1) << '\n'; for (ll x = 0; x < 2*m; x += 2) { for (ll y = -m; y <= m; y++) { cout << x << ' ' << y << ' ' << (y == 0 ? 1 : 0) << '\n'; } } vpll r; for (ll y = 0; y <= m; y++) { if (n == 0) break; ll c = s[y]; for (ll x = 0; x < 2*m; x += 2) { if (c > n) break; n -= c; r.push_back({x, y}); } } cout << r.size() << " 39 \n"; for (pll p : r) { cout << p.first << ' ' << p.second << '\n'; } return 0; }