#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  int c = 0;
  int arr[101][101];
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      arr[i][j] = 0;
    }
  }
  for (int i = b; i <= y && i <= x; i++) {
    for (int j = a; j <= x; j++) {
      if (i < j) {
        c++;
        arr[j][i] = 1;
      }
    }
  }
  cout << c << endl;
  if (c != 0) {
    for (int i = 1; i <= x; i++) {
      for (int j = 1; j <= 100; j++) {
        if (arr[i][j]) {
          cout << i << " " << j << endl;
        }
      }
    }
  }
  return 0;
}
