#include <bits/stdc++.h>
using namespace std;
struct Q {
  int c, d;
  Q(int c, int d) : c(c), d(d) {}
  Q() {}
};
bool operator<(Q a, Q b) {
  if (a.c < b.c) return true;
  if (a.c == b.c && a.d < b.d) return true;
  return false;
}
Q arr[100000];
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  int num = 0;
  for (int i = a; i <= x; i++) {
    if (i == 57) {
      cerr << 10;
    }
    for (int j = b; j <= y; j++)
      if (i > j) {
        arr[num] = Q(i, j);
        num++;
      }
  }
  for (int i = 0; i < num; i++) {
    for (int j = 0; j < num; j++)
      if (arr[i] < arr[j]) swap(arr[i], arr[j]);
  }
  cout << num << endl;
  for (int i = 0; i < num; i++) cout << arr[i].c << " " << arr[i].d << endl;
  return 0;
}
