#include <bits/stdc++.h>
using namespace std;
const int inf = (2e5) + 555;
vector<vector<int>> divs(inf);
vector<vector<int>> ans;
set<int> vert;
void sol() {
  int n, m;
  long long l, r;
  cin >> n >> m >> l >> r;
  ans.resize(n + 1);
  vector<int> id(m + 1);
  vector<int> cnt(m + 1);
  for (int i = 1; i < inf; i++) {
    for (int pos = i; pos < inf; pos += i) {
      divs[pos].push_back(i);
    }
  }
  long long rg = m, lf = m + 1;
  for (int x1 = int(1); x1 < int(n + 1); x1++) {
    long long newlf = (x1 - 1 + l) / x1, newrg = r / x1;
    while (newlf < lf) {
      lf--;
      for (int d : divs[lf]) {
        if (cnt[d] == 0) vert.insert(d);
        cnt[d]++;
        id[d] = (int)lf;
      }
    }
    while (newrg < rg) {
      for (int d : divs[rg]) {
        if (cnt[d] == 1) vert.erase(d);
        cnt[d]--;
      }
      rg--;
    }
    for (int a : divs[x1]) {
      auto it = vert.upper_bound(a);
      if (it != vert.end()) {
        int b = *it;
        int y1 = id[b];
        if (x1 / a * 1ll * b <= n) {
          ans[x1] = {x1, y1, x1 / a * b, y1 / b * a};
        }
      }
    }
  }
  for (int i = int(1); i < int(n + 1); i++) {
    if (ans[i].size() == 0) {
      cout << -1 << endl;
    } else {
      for (int j = int(0); j < int(4); j++) {
        cout << ans[i][j] << ' ';
      }
      cout << endl;
    }
  }
}
int main() {
  int t = 1;
  while (t) {
    sol();
    t--;
  }
  return 0;
}
