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