#include #include #include #include using namespace std; using i64 = long long; // please ensure x != 0 int LsbIndex(unsigned int x) noexcept { return __builtin_ctz(x); } unsigned int GCD(unsigned int a, unsigned int b) noexcept { if(!a || !b) return a|b; int q = LsbIndex(a|b); b >>= LsbIndex(b); a >>= LsbIndex(a); while(a!=b){ if(a>=LsbIndex(b); } else{ a-=b; a>>=LsbIndex(a); } } return a< Fracs; Fracs.push_back({ 0, 1 }); for(int d=1; Fracs.size() < 250000; d++) for(int j=1; j> points; points.push_back({ 102459, -75574918 }); for(auto f : Fracs){ auto [x,y] = points.back(); points.push_back({ x+f.b, y+f.a }); } for(auto f : Fracs){ auto [x,y] = points.back(); points.push_back({ x-f.a, y+f.b }); } for(auto f : Fracs){ auto [x,y] = points.back(); points.push_back({ x-f.b, y-f.a }); } for(auto f : Fracs){ auto [x,y] = points.back(); points.push_back({ x+f.a, y-f.b }); } points.pop_back(); printf("%d\n", (int)points.size()); for(auto [x,y] : points){ printf("%lld %lld\n", x, y); assert(-75574918 <= x && x <= 75574917); assert(-75574918 <= y && y <= 75574917); } return 0; }