#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
vector<int> d[MAXN];
set<pair<int, int> > S;
long long l, r, curl, curr, n, m;
void ins(int x) {
  for (int dx : d[x]) S.insert({dx, x});
}
void del(int x) {
  for (int dx : d[x]) S.erase({dx, x});
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  for (int i = 1; i < MAXN; i++)
    for (int j = i; j < MAXN; j += i) d[j].push_back(i);
  cin >> n >> m >> l >> r;
  curl = m + 1;
  curr = m;
  for (long long x1 = 1; x1 <= n; x1++) {
    while (x1 * (curl - 1) >= l) curl--, ins(curl);
    while (x1 * curr > r) del(curr), curr--;
    bool F = 0;
    for (int div : d[x1]) {
      auto it = S.upper_bound({div + 1, 0});
      if (it == S.end()) continue;
      long long y1 = (*it).second;
      long long x2 = x1 / div * (*it).first;
      long long y2 = (*it).second / (*it).first * div;
      if (x2 <= n) {
        F = 1;
        cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << '\n';
        break;
      }
    }
    if (!F) cout << -1 << '\n';
  }
}
