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