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