#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  while (scanf("%d %d %d %d", &x, &y, &a, &b) != EOF) {
    int key = 0;
    for (int i = a; i <= x; ++i) {
      int upper = min(y, i - 1);
      for (int j = b; j <= upper; ++j) {
        ++key;
      }
    }
    printf("%d\n", key);
    for (int i = a; i <= x; ++i) {
      int upper = min(y, i - 1);
      for (int j = b; j <= upper; ++j) {
        printf("%d %d\n", i, j);
      }
    }
  }
  return 0;
}
