#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void cmax(int& x, const int& y) { x = x > y ? x : y; }
void cmin(int& x, const int& y) { x = x < y ? x : y; }
template <class T>
istream& operator>>(istream& in, vector<T>& V) {
  for (auto& x : V) in >> x;
  return in;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& V) {
  for (auto x : V) out << x << ' ';
  return out;
}
template <class T>
void sort(vector<T>& V) {
  sort(V.begin(), V.end());
}
template <class T>
void reverse(vector<T>& V) {
  reverse(V.begin(), V.end());
}
template <class T>
int SZ(const vector<T>& V) {
  return (int)V.size();
}
void debug() { cerr << "whxorz" << '\n'; }
const int N = 2e5 + 4;
vector<int> v[N];
int cnt[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  ll l, r;
  cin >> n >> m >> l >> r;
  int lstl, lstr;
  lstl = m + 1;
  lstr = m;
  for (int i = 1, I = N - 1 + 1; i < I; ++i) {
    for (int j = i; j < N; j += i) {
      v[j].push_back(i);
    }
  }
  set<int> now;
  for (int i = 1, I = n + 1; i < I; ++i) {
    ll L = (l - 1) / i + 1;
    ll R = r / i;
    while (lstl > L) {
      --lstl;
      for (auto d : v[lstl])
        if (++cnt[d] == 1) now.insert(d);
    }
    while (lstr > R) {
      for (auto d : v[lstr])
        if (--cnt[d] == 0) now.erase(d);
      --lstr;
    }
    bool flag = 0;
    for (auto x : v[i]) {
      int y = i / x;
      auto it = now.upper_bound(y);
      if (it != now.end() && *it <= n / x) {
        flag = 1;
        int tmp = ((L - 1) / (*it) + 1) * (*it);
        cout << i << ' ' << tmp << ' ' << x * (*it) << ' '
             << 1ll * y * tmp / (*it) << '\n';
        break;
      }
    }
    if (!flag) cout << -1 << '\n';
  }
  return 0;
}
