#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline void mine(T1 &x, T2 y) {
  if (x > y) x = y;
}
template <typename T1, typename T2>
inline void maxe(T1 &x, T2 y) {
  if (x < y) x = y;
}
ostream &operator<<(ostream &a, const vector<long long> &b) {
  for (auto k : b) cout << k << ' ';
  return a;
}
const long long MOD = 1000000007;
const long long INF = 1000000050;
const long long BIG = (long long)2e18 + 50;
const long long MX = 200010;
const double EPS = 1e-9;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
struct req {
  long long l;
  long long r;
  long long id;
  req(long long _l = 0, long long _r = 0, long long _id = 0) {
    l = _l;
    r = _r;
    id = _id;
  }
};
long long n, m, L, R;
vector<long long> ans[MX];
vector<long long> d[MX];
vector<req> reqs[MX];
pair<long long, long long> t[4 * MX];
void build(long long v, long long l, long long r) {
  if (l + 1 == r) {
    t[v] = {d[l].back(), l};
    return;
  }
  long long mid = (l + r) / 2;
  build(2 * v, l, mid);
  build(2 * v + 1, mid, r);
  t[v] = min(t[2 * v], t[2 * v + 1]);
}
pair<long long, long long> get(long long v, long long l, long long r,
                               long long cl, long long cr) {
  if (cl >= r || cr <= l) return {INF, INF};
  if (cl >= l && cr <= r) return t[v];
  long long mid = (cl + cr) / 2;
  return min(get(2 * v, l, r, cl, mid), get(2 * v + 1, l, r, mid, cr));
}
void upd(long long v, long long ind, long long cl, long long cr) {
  if (cl + 1 == cr) {
    d[ind].pop_back();
    t[v] = {d[ind].back(), ind};
    return;
  }
  long long mid = (cl + cr) / 2;
  if (ind < mid)
    upd(2 * v, ind, cl, mid);
  else
    upd(2 * v + 1, ind, mid, cr);
  t[v] = min(t[2 * v], t[2 * v + 1]);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> L >> R;
  for (long long i = 1; i < n + 1; i++) {
    ans[i] = {-1};
    for (long long j = i; j < MX; j += i) d[j].push_back(i);
    long long l = (L + i - 1) / i;
    long long r = min(m, R / i);
    for (auto &dx : d[i]) {
      reqs[dx].push_back(req(l, r, i));
    }
  }
  for (long long i = 1; i < MX; i++) {
    d[i].push_back(INF);
    reverse(d[i].begin(), d[i].end());
  }
  build(1, 1, MX);
  for (long long dx = 1; dx < n + 1; ++dx) {
    for (long long j = dx; j < MX; j += dx) upd(1, j, 1, MX);
    for (auto &q : reqs[dx]) {
      long long l = q.l;
      long long r = q.r;
      long long x1 = q.id;
      if (ans[x1].size() != 1) continue;
      pair<long long, long long> kek = get(1, l, r + 1, 1, MX);
      if (kek.first != INF) {
        long long y1 = kek.second;
        long long yp = kek.first;
        assert(yp > dx);
        long long x2 = x1 / dx * yp;
        long long y2 = x1 * y1 / x2;
        assert(x2 > x1);
        assert(y1 > y2);
        assert(y1 <= m);
        assert(x1 * y1 == x2 * y2);
        assert(x1 * y1 >= L && x1 * y1 <= R);
        if (n < x2) continue;
        ans[x1] = {x1, y1, x2, y2};
      }
    }
  }
  for (long long i = 1; i < n + 1; i++) cout << ans[i] << '\n';
}
