#include <bits/stdc++.h>
using namespace std;
int x, y, a, b, bo = 0, n = 0;
int l[20000], r[20000];
int main() {
  cin >> x >> y >> a >> b;
  for (int i = a; i <= x; i++)
    for (int j = b; j <= y; j++)
      if (i > j) {
        l[n] = i;
        r[n] = j;
        n++;
      }
  cout << n << endl;
  for (int i = 0; i < n; i++) cout << l[i] << " " << r[i] << "\n";
  return 0;
}
