#include <bits/stdc++.h>
using LL = long long;
using ULL = unsigned long long;
using namespace std;
vector<pair<long long, long long> > ans;
long long x, y, a, b;
signed main() {
  ios::sync_with_stdio(false), cin.tie(NULL);
  cin >> x >> y >> a >> b;
  for (long long i = (max(a, b + 1)); i < (x + 1); i++) {
    for (long long j = (b); j < (min(i, y + 1)); j++) ans.emplace_back(i, j);
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << '\n';
  for (pair<long long, long long> X : ans)
    cout << X.first << ' ' << X.second << '\n';
  return 0;
}
