#include <bits/stdc++.h>
using namespace std;
const int MAXN = (1 << 18);
pair<int, int> t[2 * MAXN + 1];
void build() {
  for (int i = 0; i < MAXN; ++i) {
    t[MAXN + i] = {MAXN, i};
  }
  for (int i = MAXN - 1; i >= 1; --i) {
    t[i] = min(t[i << 1], t[i << 1 | 1]);
  }
}
pair<int, int> get_min(int v, int l, int r, int tl = 0, int tr = MAXN) {
  if (l <= tl && tr <= r) {
    return t[v];
  }
  if (r <= tl || l >= tr) {
    return {MAXN, 0};
  }
  int tm = tl + (tr - tl) / 2;
  return min(get_min(v << 1, l, r, tl, tm), get_min(v << 1 | 1, l, r, tm, tr));
}
void set_val(int pos, pair<int, int> val) {
  pos += MAXN;
  t[pos] = val;
  while (pos > 1) {
    pos >>= 1;
    t[pos] = min(t[pos << 1], t[pos << 1 | 1]);
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  long long l, r;
  cin >> n >> m >> l >> r;
  vector<vector<int>> ans(n);
  build();
  for (int d = n; d >= 1; --d) {
    for (int x = d; x <= n; x += d) {
      long long lhs = (l + x - 1) / x;
      long long rhs = min(r / x, (long long)m) + 1;
      if (lhs >= rhs) {
        continue;
      }
      auto [b, y] = get_min(1, lhs, rhs);
      long long x2 = (long long)x / d * b;
      if (x2 > n) {
        continue;
      }
      int y2 = y / b * d;
      ans[x - 1] = {x, y, (int)x2, y2};
    }
    for (int y = d; y <= m; y += d) {
      set_val(y, {d, y});
    }
  }
  for (auto &v : ans) {
    if (v.empty()) {
      cout << -1;
    } else {
      for (auto &u : v) {
        cout << u << ' ';
      }
    }
    cout << endl;
  }
}
