#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  int n = 0;
  for (int i = a; i <= x; i++) {
    for (int j = b; j <= min(y, i - 1); j++) {
      n++;
    }
  }
  cout << n << endl;
  for (int i = a; i <= x; i++) {
    for (int j = b; j <= min(y, i - 1); j++) {
      cout << i << " " << j << endl;
    }
  }
  return 0;
}
