#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
using namespace std;
namespace ywy {
int data[200010 * 4], top[200010];
vector<int> yue[200010];
set<int> st[200010];
void add(int l, int r, int tree, int pt, int x) {
  data[tree] += x;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (pt <= mid)
    add(l, mid, (tree << 1), pt, x);
  else
    add(mid + 1, r, ((tree << 1) | 1), pt, x);
}
int query(int rl, int rr, int l, int r, int tree) {
  if (rl > rr || data[tree] == 0) return (0);
  if (l == r) return (l);
  int mid = (l + r) >> 1;
  if (rl == l && rr == r) {
    if (data[(tree << 1)]) return (query(l, mid, l, mid, (tree << 1)));
    return (query(mid + 1, r, mid + 1, r, ((tree << 1) | 1)));
  }
  if (rl > mid) return (query(rl, rr, mid + 1, r, ((tree << 1) | 1)));
  if (rr <= mid) return (query(rl, rr, l, mid, (tree << 1)));
  int tmp = query(rl, mid, l, mid, (tree << 1));
  if (tmp) return (tmp);
  return (query(mid + 1, rr, mid + 1, r, ((tree << 1) | 1)));
}
void ywymain() {
  int n, m;
  cin >> n >> m;
  long long l, r;
  cin >> l >> r;
  int M = max(n, m);
  for (register int i = 1; i <= M; i++) {
    for (register int j = 1; i * j <= M; j++) yue[i * j].push_back(i);
  }
  int rl = -1, rr = -1;
  for (register int i = 1; i <= n; i++) {
    if ((((l) / (i)) + (((l) % (i)) != 0)) > m ||
        (((l) / (i)) + (((l) % (i)) != 0)) > r / i) {
      printf("-1\n");
      continue;
    }
    if (rl == -1) {
      rl = (((l) / (i)) + (((l) % (i)) != 0));
      rr = min((long long)m, r / i);
      for (register int j = rl; j <= rr; j++) {
        for (register int k = 0; k < yue[j].size(); k++)
          add(1, m, 1, yue[j][k], 1), st[yue[j][k]].insert(j);
      }
    } else {
      while (rl > (((l) / (i)) + (((l) % (i)) != 0))) {
        rl--;
        for (register int j = 0; j < yue[rl].size(); j++)
          add(1, m, 1, yue[rl][j], 1), st[yue[rl][j]].insert(rl);
      }
      while (rr > r / i) {
        for (register int j = 0; j < yue[rr].size(); j++)
          add(1, m, 1, yue[rr][j], -1), st[yue[rr][j]].erase(rr);
        rr--;
      }
    }
    if (rl > rr) {
      printf("-1\n");
      continue;
    }
    for (register int j = 0; j < yue[i].size(); j++) {
      int b = query(yue[i][j] + 1, m, 1, m, 1);
      if (!b) continue;
      int a = yue[i][j];
      if ((i * (long long)b) / a > n) continue;
      int y1 = *st[b].begin(), y2 = y1 / b * a, x2 = i / a * b;
      printf("%d %d %d %d\n", i, y1, x2, y2);
      goto s;
    }
    printf("-1\n");
  s:;
  }
}
}  // namespace ywy
int main() {
  ywy::ywymain();
  return (0);
}
