#include <bits/stdc++.h>
using namespace std;
long long n, m, l, r;
int ct[202020];
vector<int> di[202020];
set<int> st;
int main() {
  cin >> n >> m >> l >> r;
  for (int i = 1; i <= 200005; ++i) {
    for (int j = i; j <= 200005; j += i) {
      di[j].push_back(i);
    }
  }
  int aa = m + 1, bb = m;
  for (int i = 1; i <= n; ++i) {
    long long a = (l + i - 1) / i, b = min(r / i, m);
    if (a > b) {
      puts("-1");
      continue;
    }
    while (aa > a) {
      aa--;
      for (int j = 0; j < di[aa].size(); ++j) {
        ct[di[aa][j]]++;
        if (ct[di[aa][j]] == 1) {
          st.insert(di[aa][j]);
        }
      }
    }
    while (bb > b) {
      for (int j = 0; j < di[bb].size(); ++j) {
        ct[di[bb][j]]--;
        if (ct[di[bb][j]] == 0) {
          st.erase(di[bb][j]);
        }
      }
      bb--;
    }
    bool cn = false;
    for (int j = 0; j < di[i].size(); ++j) {
      int aaa = di[i][j];
      set<int>::iterator it = st.upper_bound(aaa);
      if (it == st.end()) {
        break;
      }
      long long x = *it, y = b / (*it) * (*it);
      if (i / aaa * x <= n) {
        printf("%lld %lld %lld %lld\n", i, y, i / aaa * x, y / x * aaa);
        cn = true;
        break;
      }
    }
    if (!cn) {
      puts("-1");
    }
  }
  return 0;
}
