#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3;
inline char gc() {
  static char buf[1 << 21], *S = buf, *T = buf;
  return S == T && (T = (S = buf) + fread(buf, 1, 1 << 21, stdin), S == T)
             ? EOF
             : *S++;
}
template <typename T>
inline void Rdn(T& A) {
  static char ch;
  ch = gc(), A = 0;
  while (!isdigit(ch)) ch = gc();
  while (isdigit(ch)) A = (A << 1) + (A << 3) + (ch ^ 48), ch = gc();
}
template <typename T, typename... TT>
inline void Rdn(T& A, TT&... B) {
  return Rdn(A), Rdn(B...);
}
int n, m, h, t, lim;
long long l, r;
basic_string<int> fac[N];
set<pair<int, int>> s;
int main() {
  Rdn(n, m, l, r), lim = max(n, m);
  for (register int i = (1); i <= (lim); ++i)
    for (register int j = i; j <= lim; j += i) fac[j] += i;
  int ln = m, rn = m;
  for (register int i = (1); i <= (n); ++i) {
    long long L = (l / i) + !!(l % i), R = r / i;
    if (L > R) {
      puts("-1");
      continue;
    }
    while (ln >= L && ln > 0) {
      for (register int p = (0); p < (fac[ln].size()); ++p)
        s.insert(make_pair(fac[ln][p], ln));
      ln--;
    }
    while (rn > R && rn > 0) {
      for (register int p = (0); p < (fac[rn].size()); ++p)
        s.erase(make_pair(fac[rn][p], rn));
      rn--;
    }
    bool fl = 1;
    for (register int p = (0); p < (fac[i].size()); ++p) {
      int a = fac[i][p];
      set<pair<int, int>>::iterator it = s.upper_bound(make_pair(a, 1e6));
      if (it == s.end() || 1ll * it->first * i / a > n || it->first <= a)
        continue;
      else {
        printf("%d %d %lld %lld\n", i, it->second, 1ll * it->first * i / a,
               1ll * a * it->second / it->first);
        fl = 0;
        break;
      }
    }
    fl && (puts("-1"), 0);
  }
  return 0;
}
