#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
const int INF = 2 * N;
class ST {
  pair<int, int> min_fact[4 * N + 5];
  int n;
  void assign_val(int idx, pair<int, int> v) {
    if (min_fact[idx].first > v.first) {
      min_fact[idx] = v;
    }
  }
  void update(int idx, int l, int r, int pos, int v) {
    if (l == r) {
      assign_val(idx, {v, l});
      return;
    }
    int mid = (l + r) / 2;
    if (pos <= mid)
      update(idx * 2, l, mid, pos, v);
    else
      update(idx * 2 + 1, mid + 1, r, pos, v);
    assign_val(idx, min_fact[idx * 2]);
    assign_val(idx, min_fact[idx * 2 + 1]);
  }
  pair<int, int> query(int idx, int l, int r, int a, int b) {
    if (a <= l && r <= b) return min_fact[idx];
    if (l > b || r < a) return {INF, -1};
    int mid = (l + r) / 2;
    pair<int, int> lt = query(idx * 2, l, mid, a, b);
    pair<int, int> rt = query(idx * 2 + 1, mid + 1, r, a, b);
    if (lt.first <= rt.first) return lt;
    return rt;
  }

 public:
  void reset(int _n) {
    n = _n;
    for (int i = 0; i < 4 * n + 3; i++) min_fact[i] = {INF, i};
  }
  void update(int pos, int v) { update(1, 1, n, pos, v); }
  pair<int, int> query(long long a, long long b) {
    if (a > b) return {INF, -1};
    return query(1, 1, n, a, b);
  }
};
ST tree;
struct Solution {
  int ar[5];
  Solution() {
    for (int i = 0; i < 4; i++) ar[i] = -1;
  }
};
Solution sol[N + 5];
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  long long l, r;
  cin >> l >> r;
  tree.reset(N);
  for (int fact = m; fact >= 1; fact--) {
    for (int x = fact; x <= n; x += fact) {
      long long ylow = max((long long)0, (l + x - 1) / x);
      long long yhigh = min((long long)m, r / x);
      pair<int, int> val = tree.query(ylow, yhigh);
      if (val.first != INF) {
        int y = val.second;
        int yf = val.first;
        if (yf <= (long long)fact * n / x) {
          sol[x].ar[0] = x;
          sol[x].ar[1] = y;
          sol[x].ar[2] = x / fact * yf;
          sol[x].ar[3] = y / yf * fact;
        }
      }
    }
    for (int y = fact; y <= m; y += fact) {
      tree.update(y, fact);
    }
  }
  for (int x = 1; x <= n; x++) {
    if (sol[x].ar[0] == -1)
      cout << -1 << endl;
    else {
      for (int i = 0; i < 4; i++) {
        if (i > 0) cout << " ";
        cout << sol[x].ar[i];
      }
      cout << endl;
    }
  }
  return 0;
}
