#include <bits/stdc++.h>
using namespace std;
int x, y, a, b, num_of_results;
pair<int, int> game, results[10101];
int main() {
  scanf("%d %d %d %d", &x, &y, &a, &b);
  num_of_results = 0;
  if (b >= x)
    printf("0\n");
  else {
    for (int i = a; i <= x; i++) {
      for (int j = b; j <= y; j++) {
        if (i > j) {
          results[num_of_results++] = make_pair(i, j);
        }
      }
    }
    cout << num_of_results << endl;
    for (int i = 0; i < num_of_results; i++) {
      cout << results[i].first << " " << results[i].second << endl;
    }
  }
}
