#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
long long n, m, l, r;
set<pair<int, int> > s;
vector<int> dv[maxn];
inline void Add(int i) {
  for (auto A : dv[i]) s.insert({A, i});
}
inline void Del(int i) {
  for (auto A : dv[i]) s.erase({A, i});
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> l >> r;
  for (int i = 1; i <= max(n, m); i++)
    for (int j = i; j <= max(n, m); j += i) dv[j].push_back(i);
  long long L, R;
  L = m + 1, R = m;
  for (int x1 = 1; x1 <= n; x1++) {
    while ((L - 1) * x1 >= l) Add(--L);
    while (R * x1 > r) Del(R--);
    bool e = 0;
    for (auto i : dv[x1]) {
      if (e) break;
      auto it = s.upper_bound({i + 1, 0});
      if (it == s.end()) continue;
      long long y1 = (*it).second;
      long long y2 = 1LL * i * (*it).second / (*it).first;
      long long x2 = 1LL * x1 * y1 / y2;
      if (x2 > n) continue;
      e = 1;
      cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2;
    }
    if (!e) cout << -1;
    cout << '\n';
  }
}
