#include <bits/stdc++.h>
using namespace std;
set<long long> s;
priority_queue<pair<long long, int> > q;
int vis[200010];
long long ans[200010][7];
int t[200010];
int n, m;
long long l, r;
long long read() {
  long long ans = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9')
    ans = (ans << 1) + (ans << 3) + ch - '0', ch = getchar();
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  l = read(), r = read();
  l--;
  for (int i = 1; i <= n; i++) {
    t[i] = i;
    q.push(make_pair(t[i], i));
    vis[i] = 1;
    s.insert(i);
  }
  s.insert(n + 1);
  for (int i = 2; i <= min(n, m); i++) {
    while (q.size() &&
           (q.top().first * i > n || t[q.top().second] != q.top().first)) {
      if (t[q.top().second] != q.top().first) {
        q.pop();
        continue;
      }
      vis[q.top().second] = 0;
      s.erase(q.top().second);
      q.pop();
    }
    for (int j = i; j <= m; j += i) {
      long long dl = l / j + 1, dr = min(r / j, 1ll * n) + 1;
      if (dl >= dr) continue;
      set<long long>::iterator it1 = s.lower_bound(dl), it2 = s.lower_bound(dr);
      vector<long long> o;
      o.clear();
      while (it1 != it2) {
        long long d = *it1;
        o.push_back(d);
        ans[d][1] = d, ans[d][2] = j, ans[d][3] = t[d] * i,
        ans[d][4] = ans[d][1] * ans[d][2] / ans[d][3];
        t[d] = 0;
        it1++;
      }
      for (int k = 0; k < o.size(); k++) s.erase(o[k]);
    }
    for (int j = i; j <= n; j += i)
      if (t[j]) {
        t[j] = j / i;
        if (!vis[j]) vis[j] = 1, s.insert(j);
        q.push(make_pair(t[j], j));
      }
  }
  for (int i = 1; i <= n; i++)
    if (!ans[i][1])
      printf("-1\n");
    else {
      printf("%lld %lld %lld %lld\n", ans[i][1], ans[i][2], ans[i][3],
             ans[i][4]);
    }
}
