#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, y, a, b, counter = 0;
  cin >> x >> y >> a >> b;
  for (int i = a; i <= x; i++)
    for (int j = b; j <= y; j++)
      if (j < i) counter++;
  cout << counter << endl;
  for (int i = a; i <= x; i++)
    for (int j = b; j <= y; j++)
      if (j < i) cout << i << " " << j << endl;
}
