#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long l, r;
vector<long long> edge[200005];
long long cnt[200005];
set<long long> s;
long long ans[4][200005];
signed main() {
  memset(ans, -1, sizeof(ans));
  for (long long i = 1; i < 200005; i++)
    for (long long j = i; j < 200005; j += i) edge[j].emplace_back(i);
  scanf("%lld%lld", &n, &m);
  scanf("%lld%lld", &l, &r);
  long long nl = m, nr = m;
  for (long long x1 = 1; x1 <= n; x1++) {
    while (1ll * nl >= l / (1ll * x1) + (l % (1ll * x1) != 0)) {
      long long len = edge[nl].size();
      for (long long i = 0; i < len; i++) {
        cnt[edge[nl][i]]++;
        if (cnt[edge[nl][i]] == 1) s.insert(edge[nl][i]);
      }
      nl--;
    }
    while (1ll * nr > r / (1ll * x1)) {
      long long len = edge[nr].size();
      for (long long i = 0; i < len; i++) {
        cnt[edge[nr][i]]--;
        if (cnt[edge[nr][i]] == 0) s.erase(edge[nr][i]);
      }
      nr--;
    }
    long long flag = 1;
    long long len = edge[x1].size();
    for (long long i = 0; i < len; i++) {
      long long a = edge[x1][i];
      set<long long>::iterator it = s.upper_bound(a);
      if (it == s.end()) continue;
      long long b = *it;
      long long x2 = 1ll * x1 / a * b;
      if (x2 > n) continue;
      long long y1 = ((nl + 1) / b + ((nl + 1) % b != 0)) * b;
      long long y2 = 1ll * y1 / b * a;
      flag = 0;
      printf("%lld %lld %lld %lld\n", x1, y1, x2, y2);
      break;
    }
    if (flag) printf("-1\n");
  }
}
