#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  long long int x, y, a, b;
  cin >> x >> y >> a >> b;
  std::vector<pair<long long int, long long int> > v;
  for (long long int i = a; i <= x; i++) {
    for (long long int j = b; j <= y; j++) {
      if (i > j) v.push_back({i, j});
    }
  }
  sort(v.begin(), v.end());
  cout << v.size() << '\n';
  for (long long int i = 0; i < v.size(); i++) {
    cout << v[i].first << ' ' << v[i].second << '\n';
  }
  return 0;
}
