#pragma comment(linker, "/stack:2048000000") #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, m; vector a, b, c, d; int ans; void init() { cin >> n >> m; } void solve() { a.resize(n); b.resize(n); c.resize(n); d.resize(n); for (int i = 0; i < n; ++i) { if (i < n - 1) { a[i] = b[i] = 1; } else { b[i] = m - (n - 1); a[i] = b[i] / 2 + 1; } if (i > 0) { c[i] = 1; d[i] = 2; } else { c[i] = m - 2 * n + 1; d[i] = m - 2 * n + 2; } } } void print_answer() { for (int i = 0; i < n; ++i) { cout << a[i] << " "; cout << b[i] << " "; cout << c[i] << " "; cout << d[i] << endl; } } void precalc() { } void run() { #ifdef _MY_DEBUG freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif precalc(); int t = 1; //cin >> t; //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; }