#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, A, B, x, y;
  while (cin >> x >> y >> A >> B) {
    int Count = 0;
    for (i = A; i <= x; i++) {
      for (j = B; j <= y; j++) {
        if (i > j) {
          Count++;
        }
      }
    }
    cout << Count << endl;
    for (i = A; i <= x; i++) {
      for (j = B; j <= y; j++) {
        if (i > j) {
          cout << i << " " << j << endl;
        }
      }
    }
  }
  return 0;
}
