#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> divisors(200001);
int yLeftEnd, yRightEnd;
set<pair<int, int>> S;
void Initialise(int n, int m) {
  int k = max(n, m);
  for (int i = 1; i <= k; ++i) {
    for (int j = i; j <= k; j += i) {
      divisors[j].push_back(i);
    }
  }
  yLeftEnd = m, yRightEnd = m;
}
void MoveLeftEnd(long long y) {
  for (; y <= yLeftEnd; --yLeftEnd) {
    for (int b : divisors[yLeftEnd]) {
      S.insert({b, yLeftEnd});
    }
  }
}
void MoveRightEnd(long long y) {
  for (; y < yRightEnd; --yRightEnd) {
    for (int b : divisors[yRightEnd]) {
      S.erase({b, yRightEnd});
    }
  }
}
long long Ceiling(long long a, long long b) { return (a + b - 1) / b; }
long long Floor(long long a, long long b) { return a / b; }
int main() {
  long long n, m, l, r;
  scanf("%lld%lld%lld%lld", &n, &m, &l, &r);
  Initialise(n, m);
  for (int x1 = 1; x1 <= n; ++x1) {
    MoveLeftEnd(Ceiling(l, x1));
    MoveRightEnd(Floor(r, x1));
    int y1 = 0, x2, y2;
    for (int a : divisors[x1]) {
      if (S.empty()) {
        continue;
      }
      auto it = S.upper_bound({a, 200001});
      if (it == S.end()) {
        continue;
      }
      int b = it->first;
      long long x = 1ll * (x1 / a) * b;
      if (x > n) {
        continue;
      }
      y1 = it->second, x2 = x;
      break;
    }
    if (y1 == 0) {
      printf("-1\n");
    } else {
      y2 = 1ll * x1 * y1 / x2;
      printf("%d %d %d %d\n", x1, y1, x2, y2);
    }
  }
  return 0;
}
