#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
signed main() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0);
  ;
  int n, m;
  long long l, r;
  cin >> n >> m >> l >> r;
  vector<int> constant_opt(max(n, m) + 1);
  for (int i = 1; i <= max(n, m); i++)
    for (int j = i; j <= max(n, m); j += i) constant_opt[j]++;
  vector<vector<int>> as(n + 1);
  for (int i = 1; i <= n; i++) as[i].reserve(constant_opt[i]);
  for (int x = 1; x <= n; x++) {
    for (int a = 1; a * x <= n; a++) {
      int x1 = x * a;
      as[x1].push_back(a);
    }
  }
  vector<vector<int>> bs(m + 1);
  for (int i = 1; i <= m; i++) bs[i].reserve(constant_opt[i]);
  for (int i = 1; i <= m; i++)
    for (int j = i; j <= m; j += i) bs[j].push_back(i);
  vector<array<int, 4>> ans(n + 1, {-1, -1, -1, -1});
  long long lbb = m + 1, rbb = m;
  set<pair<int, int>> s;
  for (int x1 = 1; x1 <= n; x1++) {
    long long lb = (l + x1 - 1) / x1, rb = min(r / x1, (long long)m);
    if (lb > rb) continue;
    auto add = [&](int pos) {
      for (int i : bs[pos]) s.insert({i, pos});
    };
    auto del = [&](int pos) {
      for (int i : bs[pos]) s.erase({i, pos});
    };
    while (lbb > lb) add(--lbb);
    while (rbb > rb) del(rbb--);
    sort((as[x1]).begin(), (as[x1]).end());
    for (int a : as[x1]) {
      auto it = s.upper_bound({a, INF});
      if (it == s.end()) break;
      if ((long long)it->first * (x1 / a) > n) continue;
      int b = it->first, y1 = it->second, y = y1 / b, x2 = b * (x1 / a),
          y2 = a * y;
      assert(x1 <= n && x2 <= n && y1 <= m && y2 <= m);
      assert((long long)x1 * y1 == (long long)x2 * y2);
      assert(x1 != x2);
      ans[x1] = {x1, y1, x2, y2};
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i][0] == -1)
      cout << -1 << '\n';
    else
      cout << ans[i][0] << ' ' << ans[i][1] << ' ' << ans[i][2] << ' '
           << ans[i][3] << '\n';
  }
}
