#include <bits/stdc++.h>
const int MAXN = 2e5 + 5;
std::vector<int> G[MAXN];
inline void prework() {
  for (int i = 1; i <= 200000; ++i)
    for (int j = i; j <= 200000; j += i) G[j].push_back(i);
}
long long L, R;
int n, m;
std::set<std::pair<int, int> > S;
int main() {
  prework();
  scanf("%d%d%lld%lld", &n, &m, &L, &R);
  int nowl = m + 1, nowr = m;
  for (int x = 1; x <= n; ++x) {
    long long l = L / x, r = R / x;
    if (1ll * x * l < L) ++l;
    r = std::min(r, (long long)m);
    if (l > r) {
      puts("-1");
      continue;
    }
    while (l < nowl) {
      nowl--;
      for (auto x : G[nowl]) S.insert(std::make_pair(x, nowl));
    }
    while (nowr > r) {
      for (auto x : G[nowr]) S.erase(std::make_pair(x, nowr));
      nowr--;
    }
    bool flag = 0;
    for (auto a : G[x]) {
      auto it = S.upper_bound(std::make_pair(a, 1e9));
      if (it == S.end()) break;
      int b = it->first, y = it->second;
      if (1ll * (x / a) * b <= n) {
        flag = 1;
        printf("%d %d %d %d\n", x, y, x / a * b, y / b * a);
        break;
      }
    }
    if (!flag) {
      puts("-1");
    }
  }
  return 0;
}
