#include using namespace std; using ll = long long; struct P { int x, y; }; int main() { int n = 641, m = 1000000 / 8 - 1; vector

p; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) { if (gcd(i, j) != 1) continue; p.push_back({ i, j }); } } sort(p.begin(), p.end(), [&](const P &p0, const P &p1) { return p0.x + p0.y > p1.x + p1.y; }); p.resize(m); sort(p.begin(), p.end(), [&](const P &p0, const P &p1) { return p1.x * p0.y > p0.x * p1.y; }); cout << (m + 1) * 8 << '\n'; int x = 80326896, y = 0; for (int h = 0; h < 4; h++) { auto f = [&](int dx, int dy) { cout << x << ' ' << y << '\n'; for (int i = 0; i < h; i++) { int t = dx; dx = -dy; dy = t; } x += dx; y += dy; }; f(0, 1); for (int i = 0; i < m; i++) { f(-p[i].x, p[i].y); } f(-1, 1); for (int i = m - 1; i >= 0; i--) { f(-p[i].y, p[i].x); } } cout << flush; return 0; }