#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, mx = 2e5;
int n, m;
long long L, R, l, r;
vector<int> v[N];
set<pair<int, int> > S;
void set_add(int x) {
  for (int i = 0, l = v[x].size(); i < l; i++) S.insert(make_pair(v[x][i], x));
}
void set_delete(int x) {
  for (int i = 0, l = v[x].size(); i < l; i++) S.erase(make_pair(v[x][i], x));
}
int main() {
  for (int i = 1, j; i <= mx; i++) {
    for (int j = i; j <= mx; j += i) v[j].push_back(i);
  }
  scanf("%d%d%lld%lld", &n, &m, &L, &R);
  int sl = m + 1, sr = m, a, b, x, y;
  for (x = 1; x <= n; x++) {
    l = (L + x - 1) / x, r = min(1LL * m, R / x);
    if (l > r) {
      puts("-1");
      continue;
    }
    while (l < sl) set_add(--sl);
    while (r < sr) set_delete(sr--);
    bool flag = 0;
    for (int i = 0; i < v[x].size(); i++) {
      a = v[x][i];
      set<pair<int, int> >::iterator it = S.upper_bound(make_pair(a, 1e9));
      if (it == S.end()) break;
      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");
  }
}
