#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int mod = 1e9 + 7;
long long int powmod(long long int a, long long int b) {
  long long int res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int nxt() {
  int x;
  scanf("%d", &x);
  return x;
}
int main() {
  long long int n, m, l, r;
  cin >> n >> m >> l >> r;
  vector<pair<int, int> > left, right;
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j += i) {
      left.push_back({j, i});
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i; j <= m; j += i) {
      right.push_back({j, i});
    }
  }
  sort((left).begin(), (left).end());
  sort((right).begin(), (right).end());
  set<int> s;
  vector<int> cnt(m + 1, 0), id(m + 1, -1);
  int ar = right.size() - 1, al = right.size() - 1;
  vector<vector<int> > ans(n + 1);
  for (auto x : left) {
    if (ans[x.first].size() != 0) continue;
    long long int upper = min(m, r / x.first);
    long long int lower = (x.first + l - 1) / x.first;
    while (ar >= 0 && right[ar].first > upper) {
      int d = right[ar].second;
      cnt[d]--;
      if (cnt[d] == 0) s.erase(d);
      ar--;
    }
    while (al >= 0 && right[al].first >= lower) {
      int d = right[al].second;
      s.insert(d);
      cnt[d]++;
      id[d] = right[al].first;
      al--;
    }
    auto it = s.upper_bound(x.second);
    if (it == s.end()) continue;
    int b = *it, y = id[b];
    if (b > x.second &&
        (long long int)x.first / x.second * b <= (long long int)n) {
      if (ans[x.first].size() == 0) {
        ans[x.first].push_back(x.first);
        ans[x.first].push_back(y);
        ans[x.first].push_back(x.first / x.second * b);
        ans[x.first].push_back(y / b * x.second);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i].size() == 0)
      puts("-1");
    else
      printf("%d %d %d %d\n", ans[i][0], ans[i][1], ans[i][2], ans[i][3]);
  }
  return 0;
}
