#include #include #include #include #include #include #pragma GCC optimize("O2") using ll = long long int; using P = std::pair; const int INF = (1<<30); const ll INFLL = (1ll<<60); const ll MOD = (ll)(1e9+7); #define l_ength size void mul_mod(ll& a, ll b){ a *= b; a %= MOD; } void add_mod(ll& a, ll b){ a = (a vec,v; bool comp(P a, P b){ return (a.first * b.second < b.first * a.second); } bool eq(P a, P b){ return (a.first * b.second == b.first * a.second); } int main(void){ int n=1000000,i,j,x=0,y=0; std::cout << n << std::endl; for(i=1; i<=666; ++i){ for(j=1; j<=666; ++j){ vec.push_back(P(i,j)); } } vec.push_back(P(1,0)); n /= 4; std::sort(vec.begin(),vec.end(),comp); for(i=0; i=0; --i){ std::cout << x << " " << y << std::endl; x -= vec[i].first; y -= vec[i].second; } for(i=0; i=0; --i){ std::cout << x << " " << y << std::endl; x += vec[i].first; y += vec[i].second; } return 0; }