#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
inline void amin(T &x, const T &y) {
  if (y < x) x = y;
}
template <class T>
inline void amax(T &x, const T &y) {
  if (x < y) x = y;
}
template <class Iter>
void rprintf(const char *fmt, Iter begin, Iter end) {
  for (bool sp = 0; begin != end; ++begin) {
    if (sp)
      putchar(' ');
    else
      sp = true;
    printf(fmt, *begin);
  }
  putchar('\n');
}
long long N, M;
long long L, R;
int ans[200011][4];
vector<int> F[200011];
int C[200011];
set<int> se;
void MAIN() {
  scanf("%lld%lld%lld%lld", &N, &M, &L, &R);
  for (int i = 1; i <= 200000; i++)
    for (int j = i; j <= 200000; j += i) {
      F[j].push_back(i);
    }
  long long y_low = M + 1;
  long long y_high = M;
  for (long long X1 = 1; X1 <= N; X1++) {
    long long new_y_low = max(1LL, (L + X1 - 1) / X1);
    long long new_y_high = min(M, R / X1);
    if (new_y_low > new_y_high) continue;
    while (new_y_low < y_low) {
      y_low--;
      for (__typeof((F[y_low]).begin()) e = (F[y_low]).begin(),
                                        e_end = (F[y_low]).end();
           e != e_end; ++e) {
        C[*e]++;
        if (C[*e] == 1) {
          se.insert(*e);
        }
      }
    }
    while (new_y_high < y_high) {
      for (__typeof((F[y_high]).begin()) e = (F[y_high]).begin(),
                                         e_end = (F[y_high]).end();
           e != e_end; ++e) {
        C[*e]--;
        if (C[*e] == 0) {
          se.erase(*e);
        }
      }
      y_high--;
    }
    for (__typeof((F[X1]).begin()) e = (F[X1]).begin(), e_end = (F[X1]).end();
         e != e_end; ++e) {
      long long B = *e;
      auto it = se.upper_bound(B);
      if (it == se.end()) break;
      long long A = *it;
      long long K = X1 / B;
      if (K * A <= N) {
        long long T = y_high / A;
        ans[X1][0] = X1;
        ans[X1][1] = T * A;
        ans[X1][2] = K * A;
        ans[X1][3] = T * B;
        break;
      }
    }
  }
  for (int i = 1; i <= N; i++) {
    if (ans[i][0] == 0) {
      puts("-1");
    } else {
      rprintf("%d", ans[i], ans[i] + 4);
      assert(ans[i][0] <= N);
      assert(ans[i][1] <= M);
      assert(ans[i][2] <= N);
      assert(ans[i][3] <= M);
      assert(ans[i][0] < ans[i][2]);
      assert(ans[i][3] < ans[i][1]);
      long long left = (long long)ans[i][0] * ans[i][1];
      long long right = (long long)ans[i][2] * ans[i][3];
      assert(left == right);
      assert(L <= left && left <= R);
    }
  }
}
int main() {
  int TC = 1;
  for (int tc = 0, tc_len = (TC); tc < tc_len; ++tc) MAIN();
  return 0;
}
