#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
const int inf = 0x3f3f3f3f;
int n, m, ans[maxn][2], mn[maxn << 2];
long long l, r;
void build(int rt, int l, int r) {
  mn[rt] = inf;
  if (l == r) return;
  int mid = (l + r) >> 1;
  build((rt << 1), l, mid), build((rt << 1 | 1), mid + 1, r),
      (mn[rt] = min(mn[(rt << 1)], mn[(rt << 1 | 1)]));
}
void update(int rt, int l, int r, int u, int v) {
  if (l == r) {
    mn[rt] = min(mn[rt], v);
    return;
  }
  int mid = (l + r) >> 1;
  if (u <= mid)
    update((rt << 1), l, mid, u, v);
  else
    update((rt << 1 | 1), mid + 1, r, u, v);
  (mn[rt] = min(mn[(rt << 1)], mn[(rt << 1 | 1)]));
}
int query(int rt, int l, int r, int x, int y) {
  if (x <= l && r <= y) return mn[rt];
  int mid = (l + r) >> 1;
  if (y <= mid) return query((rt << 1), l, mid, x, y);
  if (x > mid) return query((rt << 1 | 1), mid + 1, r, x, y);
  return min(query((rt << 1), l, mid, x, y),
             query((rt << 1 | 1), mid + 1, r, x, y));
}
int main() {
  scanf("%d%d%lld%lld", &n, &m, &l, &r);
  build(1, 1, m);
  for (int i = 1; i <= n; i++) ans[i][0] = ans[i][1] = -1;
  for (int b = m; b > n; b--)
    for (int i = b; i <= m; i += b) update(1, 1, m, i, b);
  for (int b = n; b; b--) {
    for (int zlztxdy = b; zlztxdy <= n; zlztxdy += b)
      if (ans[zlztxdy][0] == -1) {
        long long L = max((l - 1) / zlztxdy + 1, 1ll),
                  R = min(r / zlztxdy, (long long)m);
        if (L > R || R <= 0 || L > m) continue;
        int a = query(1, 1, m, L, R);
        if (a != inf && (long long)zlztxdy / b * a <= (long long)n)
          ans[zlztxdy][0] = b, ans[zlztxdy][1] = a;
      }
    for (int i = b; i <= m; i += b) update(1, 1, m, i, b);
  }
  for (int zlztxdy = 1; zlztxdy <= n; zlztxdy++) {
    if (ans[zlztxdy][0] == -1) {
      puts("-1");
      continue;
    }
    long long L = max((l - 1) / zlztxdy + 1, 1ll),
              R = min(r / zlztxdy, (long long)m);
    if (L > R || R <= 0 || L > m) continue;
    int b = ans[zlztxdy][0], a = ans[zlztxdy][1];
    int zlztsdy = (L % a == 0) ? L : (L / a + 1) * a, ljctxdy = zlztxdy / b * a,
        ljctsdy = zlztsdy / a * b;
    printf("%d %d %d %d\n", zlztxdy, zlztsdy, ljctxdy, ljctsdy);
  }
  return 0;
}
