#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int> > sol;
  int x, y, a, b;
  scanf("%d %d %d %d", &x, &y, &a, &b);
  int n = 0;
  for (int i = max(a, b + 1); i <= x; i++) {
    for (int j = b; j <= min(y, i - 1); j++) {
      n++;
      sol.push_back(pair<int, int>(i, j));
    }
  }
  cout << n << endl;
  for (int i = 0; i < n; i++) {
    cout << sol[i].first << " " << sol[i].second << endl;
  }
  return 0;
}
