#include <bits/stdc++.h>
const int MAXN = 200005;
using namespace std;
struct Ans {
  long long x1, y1, x2, y2;
};
long long n, m, lb, rb;
Ans ans[MAXN];
vector<long long> fac[MAXN];
void solve() {
  for (int i = 1; i < MAXN; i++) {
    for (int j = i; j < MAXN; j += i) {
      fac[j].push_back(i);
    }
  }
  cin >> n >> m >> lb >> rb;
  map<long long, int> cnt, where;
  long long curl = 1, curr = 1;
  for (long long i = n; i >= 1; i--) {
    long long yl = (lb + i - 1) / i, yr = min(rb / i, m);
    while (curr <= yr) {
      for (int f : fac[curr]) {
        cnt[f]++;
        where[f] = curr;
      }
      curr++;
    }
    while (curl < yl && curl < curr) {
      for (long long f : fac[curl]) {
        cnt[f]--;
        if (cnt[f] == 0) {
          cnt.erase(cnt.find(f));
        }
      }
      curl++;
    }
    ans[i] = {-1, -1, -1, -1};
    for (long long a : fac[i]) {
      auto it = cnt.upper_bound(a);
      if (it != cnt.end() && i / a * it->first <= n) {
        long long x1 = i, y1 = where[it->first];
        long long x2 = i / a * it->first, y2 = x1 * y1 / x2;
        ans[i] = {x1, y1, x2, y2};
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i].x1 == -1) {
      cout << "-1\n";
    } else {
      auto p = ans[i];
      cout << p.x1 << ' ' << p.y1 << ' ' << p.x2 << ' ' << p.y2 << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int tc = 1;
  for (int i = 1; i <= tc; i++) {
    solve();
  }
  return 0;
}
