#include <bits/stdc++.h>
using namespace std;
vector<int> V[200007];
set<int> S;
int n, m, T[200007];
long long l, r;
int main() {
  scanf("%d%d%lld%lld", &n, &m, &l, &r), --l;
  for (int i = 1, _ = max(n, m); i <= _; ++i)
    for (int j = i; j <= n || j <= m; j += i) V[j].push_back(i);
  int L = m + 1, R = m;
  for (int i = 1, _ = n; i <= _; ++i) {
    long long qL = l / i + 1, qR = r / i;
    int o = 1;
    while (L > qL) {
      --L;
      for (int j : V[L])
        if (++T[j] == 1) S.insert(j);
    }
    while (R > qR) {
      for (int j : V[R])
        if (--T[j] == 0) S.erase(j);
      --R;
    }
    for (int j : V[i]) {
      auto s = S.upper_bound(j);
      int g;
      if (s != S.end() && 1LL * i / j * (g = *s) <= n) {
        printf("%d %d %d %d\n", i, R / g * g, i / j * g, R / g * j);
        o = 0;
        break;
      }
    }
    if (o) puts("-1");
  }
  return 0;
}
