#include using namespace std; using ll = long long; void solve(){ vector> D; int dx = 1; int dy = 2; while(D.size() * 4 < 1000000){ if(gcd(dx, dy) == 1){ D.push_back({dx, dy}); D.push_back({dy, dx}); } dx++; if(dx == dy){ dx = 1; dy++; } } sort(D.begin(), D.end(), [](pair &l, pair &r){ return l.first * r.second < r.first * l.second; }); int x = -1000000000; int y = 0; cout << 1000000 << '\n'; for(auto tmp:D){ x += tmp.first; y += tmp.second; cout << x << " " << y << '\n'; } for(auto tmp:D){ x += tmp.second; y -= tmp.first; cout << x << " " << y << '\n'; } for(auto tmp:D){ x -= tmp.first; y -= tmp.second; cout << x << " " << y << '\n'; } for(auto tmp:D){ x -= tmp.second; y += tmp.first; cout << x << " " << y << '\n'; } cout << endl; } int main(){ cin.tie(0)->sync_with_stdio(0); cout << fixed << setprecision(12); int t; t = 1; while(t--) solve(); }