#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<int, int> > outcomes;
  vector<pair<int, int> >::iterator it;
  if (a <= b) a = b + 1;
  for (int i = a; i <= x; i++) {
    for (int j = b; j <= y; j++) {
      if (j < i) outcomes.push_back(pair<int, int>(i, j));
    }
  }
  cout << outcomes.size() << endl;
  for (it = outcomes.begin(); it != outcomes.end(); it++) {
    cout << it->first << " " << it->second << endl;
  }
  return 0;
}
