#include <bits/stdc++.h>
using namespace std;
const long long N = (long long)2e5 + 10;
const long long inf = (long long)1e9;
vector<long long> d[N];
long long n, m;
struct sols {
  long long xv;
  long long yv;
  long long xs;
  long long ys;
};
struct Rect {
  long long cl;
  long long cr;
  long long tl;
  long long x1;
  long long b;
};
sols xy[N];
vector<Rect> qq[N];
long long seg[N * 4 + 512];
void upd(long long node, long long cl, long long cr, long long pos,
         long long v) {
  if (cl == cr) {
    seg[node] = v;
    return;
  }
  long long mid = (cl + cr) / 2;
  if (mid >= pos)
    upd(node * 2, cl, mid, pos, v);
  else
    upd(node * 2 + 1, mid + 1, cr, pos, v);
  seg[node] = max(seg[node * 2], seg[node * 2 + 1]);
}
long long get(long long node, long long cl, long long cr, long long tl,
              long long tr) {
  if (cr < tl || cl > tr) return 0ll;
  if (cl >= tl && cr <= tr) {
    return seg[node];
  }
  long long mid = (cl + cr) / 2;
  return max(get(node * 2, cl, mid, tl, tr),
             get(node * 2 + 1, mid + 1, cr, tl, tr));
}
vector<long long> g[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  long long li, ri;
  cin >> li >> ri;
  for (long long i = 1; i < N; i++) {
    for (long long j = i; j < N; j += i) {
      d[j].push_back(i);
      g[i].push_back(j);
    }
  }
  for (long long i = 1; i <= n; i++) xy[i] = {-1, -1, -1, -1};
  long long lf, rf;
  long long pi, qi;
  long long low;
  long long x2, y1, y2;
  long long kk;
  for (long long x1 = 1; x1 <= n; x1++) {
    lf = (li + x1 - 1) / x1;
    rf = ri / x1;
    if (lf <= rf) {
      for (auto b : d[x1]) {
        if (b > m) continue;
        pi = b + 1;
        qi = min(m, (n * 1ll * b) / x1);
        qq[qi].push_back({lf, rf, pi, x1, b});
      }
    }
  }
  long long sol;
  for (long long i = 1; i <= n; i++) {
    for (auto p : g[i]) {
      if (p <= m) upd(1, 1, m, p, i);
    }
    for (auto q : qq[i]) {
      if (xy[q.x1].xs != -1) continue;
      sol = get(1, 1, m, q.cl, q.cr);
      if (sol >= q.tl) {
        x2 = q.x1 * sol / q.b;
        kk = (q.cl + sol - 1) / sol;
        y1 = kk * sol;
        y2 = q.b * kk;
        xy[q.x1] = {q.x1, y1, x2, y2};
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (xy[i].xs == -1)
      cout << "-1\n";
    else {
      cout << xy[i].xv << " " << xy[i].yv << " " << xy[i].xs << " " << xy[i].ys
           << "\n";
    }
  }
  return 0;
}
