#include #include #include #include #include using namespace std; int main() { const int N = 1000000; set> st; bool ok = false; for (int i = 1; i < 1300; ++i) { for (int j = 1; j < 1300; ++j) { int g = __gcd(i, j); st.emplace(static_cast(j) / i, i / g, j / g); if (st.size() == N) { ok = true; break; } } if (ok) { break; } } vector> L(st.begin(), st.end()); sort(L.begin(), L.end()); vector> ans; long long nowx = -1000000000 + 1; long long nowy = -1000000000 + 1; for (int i = 0; i < N; ++i) { int x = get<1>(L[i]); int y = get<2>(L[i]); nowx += x; nowy += y; ans.emplace_back(nowx, nowy); } cout << N << '\n'; for (int i = 0; i < N; ++i) { cout << ans[i].first << " " << ans[i].second << '\n'; } return 0; }