#include <bits/stdc++.h>
using namespace std;
int ans[10001][2];
int main() {
  int x, y, a, b, n = 0;
  cin >> x >> y >> a >> b;
  for (int i = a; i <= x; i++)
    for (int j = b; j < i && j <= y; j++) {
      ans[n][0] = i;
      ans[n][1] = j;
      n++;
    }
  cout << n << endl;
  for (int i = 0; i < n; i++) cout << ans[i][0] << ' ' << ans[i][1] << endl;
  return 0;
}
