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