#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  long long int l, r;
  cin >> n >> m >> l >> r;
  auto max_m_n = max(m, n);
  vector<long long int> divs[max_m_n + 1];
  bool flag = false;
  for (long long int i = 1; i <= max_m_n; i++) {
    for (long long int pos = i; pos <= max_m_n; pos = pos + i) {
      divs[pos].push_back(i);
    }
  }
  long long int last_L = m + 1, Last_R = m;
  vector<int> cnt(m + 1, 0);
  vector<int> id(m + 1, -1);
  set<int> curDivs;
  for (long long int x1 = 1; x1 <= n; x1++) {
    flag = true;
    long long int L = (l + x1 - 1) / x1;
    long long int R = r / x1;
    if (L > R) {
      cout << -1 << endl;
      continue;
    }
    while (last_L > L) {
      last_L--;
      for (int d : divs[last_L]) {
        if (cnt[d] == 0) curDivs.insert(d);
        cnt[d]++;
        id[d] = (int)last_L;
      }
    }
    while (Last_R > R) {
      for (int d : divs[Last_R]) {
        cnt[d]--;
        if (cnt[d] == 0) curDivs.erase(d);
      }
      Last_R--;
    }
    for (long long int a : divs[x1]) {
      auto b_it = curDivs.upper_bound(a);
      if (b_it == curDivs.end()) {
        break;
      }
      auto b = *b_it;
      auto y1 = id[b];
      if (x1 / a * b <= n) {
        cout << x1 << " " << y1 << " " << x1 / a * b << " " << y1 / b * a
             << endl;
        flag = false;
        break;
      }
    }
    if (flag) {
      cout << -1 << endl;
    }
  }
  return 0;
}
