#include <bits/stdc++.h>
int main() {
  int i, j, x, y, a, b;
  int n = 0;
  scanf("%d %d %d %d", &x, &y, &a, &b);
  for (i = a; i <= x; i++)
    for (j = b; j <= y; j++)
      if ((j < i) && (j <= y)) n++;
  printf("%d\n", n);
  for (i = a; i <= x; i++)
    for (j = b; j <= y; j++)
      if ((j < i) && (j <= y)) printf("%d %d\n", i, j);
  return 0;
}
