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