#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; bool rcmp(int a, int b) { return a>b; } typedef long long LL; class mypcmp { public: bool operator()(const int& a, const int& b) { return a LL v1=a.y; v1*=b.x; LL v2=b.y; v2*=a.x; return v1>v2; } int main() { int n, i, x, y, k, d, h, j, m; k=0; for (i=1; i<=800; i++) for (j=1; j<=800; j++) { ps[k].x=i; ps[k].y=j; k++; } sort(ps, ps+k, mycmp); x=-1000000000; y=0; m=k; k=0; for (i=0; i250000) break; if (x>=0||y>1000000000) break; if (i&&!mycmp(ps[i-1], ps[i])) continue; xs[k]=x; ys[k]=y; k++; x+=ps[i].x; y+=ps[i].y; } printf("%d\n", (k-1)*4); for (i=1; i0; i--) printf("%d %d\n", xs[i], ys[i]); for (i=1; i0; i--) printf("%d %d\n", -xs[i], -ys[i]); return 0; }