#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<int> ans;
  ans.push_back(-1);
  if (a == b) a++;
  for (int i = a; i <= x; i++) {
    for (int j = b; j <= y;) {
      if (j >= i) break;
      ans.push_back(i);
      ans.push_back(j);
      j++;
    }
  }
  int l = ans.size();
  if (l == 1)
    cout << "0" << endl;
  else {
    l = l / 2;
    cout << l << endl;
    for (int i = 1, k = 0; i <= l; i++, k++) {
      cout << ans[i + k] << " " << ans[i + k + 1] << endl;
    }
  }
  return 0;
}
