#include <bits/stdc++.h>
using namespace std;
vector<long long> divisors[200000 + 1];
long long ans[200000 + 1][4];
long long N, M, L, R;
set<long long> candidateB;
long long cnt[200000 + 1];
long long btoy[200000 + 1];
void solve() {
  long long curL = M + 1, curR = M;
  for (long long x1 = 1; x1 <= N; x1++) {
    long long ncurL = (L + x1 - 1) / x1, ncurR = R / x1;
    while (ncurL < curL) {
      curL--;
      for (long long d : divisors[curL]) {
        if (cnt[d] == 0) {
          candidateB.insert(d);
        }
        cnt[d]++;
        btoy[d] = curL;
      }
    }
    while (ncurR < curR) {
      for (long long d : divisors[curR]) {
        cnt[d]--;
        if (cnt[d] == 0) {
          candidateB.erase(d);
        }
      }
      curR--;
    }
    for (long long a : divisors[x1]) {
      set<long long>::iterator it = candidateB.upper_bound(a);
      if (it == candidateB.end()) {
        continue;
      }
      long long b = *it;
      long long y1 = btoy[b];
      if (b * x1 / a <= N) {
        ans[x1][0] = x1;
        ans[x1][1] = y1;
        ans[x1][2] = b * x1 / a;
        ans[x1][3] = a * y1 / b;
      }
    }
  }
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  cin >> N >> M;
  cin >> L >> R;
  for (long long i = 1; i <= 200000; i++) {
    for (long long j = i; j <= 200000; j += i) {
      divisors[j].push_back(i);
    }
  }
  solve();
  for (long long i = 1; i <= N; i++) {
    if (ans[i][0]) {
      cout << ans[i][0] << ' ' << ans[i][1] << ' ' << ans[i][2] << ' '
           << ans[i][3] << '\n';
    } else {
      cout << -1 << '\n';
    }
  }
  return 0;
}
