#include <bits/stdc++.h>
using namespace std;
int main() {
  long x, y, a, b;
  cin >> x >> y >> a >> b;
  set<pair<int, int> > answers;
  if (a <= b) a = b + 1;
  for (; a <= x; a++) {
    for (int z = b; z < a && z <= y; z++) {
      answers.insert(make_pair(a, z));
    }
  }
  cout << answers.size() << endl;
  for (set<pair<int, int> >::iterator it = answers.begin(); it != answers.end();
       it++) {
    cout << (*it).first << " " << (*it).second << endl;
  }
}
