#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
long long n, m, l, r;
vector<int> hav[N];
int cnt[N];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> l >> r;
  int mm = max(n, m);
  for (int i = 1; i <= mm; i++) {
    for (int j = 1; j <= mm / i; j++) {
      hav[i * j].push_back(i);
    }
  }
  long long rp, lp, nxtr, nxtl;
  rp = m;
  lp = m + 1;
  set<int> st;
  for (int x1 = 1; x1 <= n; x1++) {
    nxtr = min(m, r / x1);
    nxtl = (l + x1 - 1) / x1;
    while (lp > nxtl) {
      --lp;
      for (auto x : hav[lp]) {
        if (cnt[x] == 0) st.insert(x);
        cnt[x]++;
      }
    }
    while (rp > nxtr) {
      for (auto x : hav[rp]) {
        if (cnt[x] == 1) st.erase(x);
        cnt[x]--;
      }
      --rp;
    }
    bool if_find = 0;
    for (auto a : hav[x1]) {
      auto ii = st.upper_bound(a);
      if (ii == st.end()) continue;
      int b = *ii;
      if (1LL * x1 * b / a <= n) {
        int y1 = (lp % b == 0 ? lp : (lp / b + 1) * b);
        int x2 = x1 / a * b;
        int y2 = y1 / b * a;
        cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << '\n';
        if_find = 1;
        break;
      }
    }
    if (!if_find) cout << -1 << '\n';
  }
  return 0;
}
