#include <iostream>
#include <random>
using namespace std;
mt19937_64 Rand('C'^'h'^'e'^'r'^'i'^'s'^'h'^'e'^'d');
#define rand Rand
int main() {
    freopen("geo.in", "w", stdout);
    ios::sync_with_stdio(false);
    int n, q, A, B;
    cin >> n >> q >> A >> B;
    cout << n << " " << q << '\n';

    for (int i = 1; i <= n; i++) {
        cout << int(rand() % ((A << 1) + 1)) - A << " "
             << int(rand() % ((B << 1) + 1)) - B << '\n';
    }

    for (int i = 1; i <= q; i++) {
        int L = rand() % (n - 1) + 2, l = rand() % (n - L + 1) + 1;
        cout << l << " " << l + L - 1 << '\n';
    }

    return 0;
}
