#pragma comment(linker, "/stack:256000000") #define _crt_secure_no_deprecate #define _crt_secure_no_warnings #define _use_math_defines #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int64; typedef unsigned long long uint64; typedef pair pii; typedef pair pll; typedef pair pli; typedef pair pil; typedef pair pib; const int inf = (int) (1e9 + 1e5); const int64 linf = (int64) (2e18); const int64 base = 1003; const double eps = 1e-9; #define sq(x) ((x)*(x)) #define fail(what) {throw logic_error(string(what));} #define ASSERT(exp) {if (!(exp)) {fail("");}} #define ASSERTC(exp, what) {if (!(exp)) {fail(what);}} #define y1 fjgjf //typedef complex comp; const int mod = 998244353;//1'000'000'007; int add(int a, int b) { a += b; if (a >= mod) { a -= mod; } return a; } int sub(int a, int b) { a -= b; if (a < 0) { a += mod; } return a; } int mul(int a, int b) { return int64(a) * b % mod; } int bin_pow(int a, int b) { int res = 1; while (b) { if (b & 1) { res = mul(res, a); } b >>= 1; a = mul(a, a); } return res; } int back(int a) { return bin_pow(a, mod - 2); } int divv(int a, int b) { return mul(a, back(b)); } int tnum; int n, w; vector ans; inline int get_w(int val) { if (w >= 5000) { return val; } else { return 10000 - val; } } void init() { cin >> n >> w; } void solve() { int last = n / 2 - 1; ans.resize(n); for (int i = 0; i < n; ++i) { ans[i] = pii(get_w(i), i <= last ? last - i : i); } } void print_answer() { for (auto& p : ans) { printf("%d %d\n", p.first, p.second); } } void precalc() { } void run() { #ifdef _MY_DEBUG freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif precalc(); int t = 1; //scanf ("%d", &t); for (tnum = 1; tnum <= t; ++tnum) { init(); solve(); print_answer(); } } signed main() { srand(94); ios_base::sync_with_stdio(false); cin.tie(0); run(); return 0; }