#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  vector<pair<int, int> > S;
  cin >> x >> y >> a >> b;
  for (int i = a; i <= x; ++i) {
    for (int j = b; j <= y; ++j) {
      if (i > j) {
        S.push_back(make_pair(i, j));
      }
    }
  }
  sort(S.begin(), S.end());
  cout << S.size() << endl;
  for (int i = 0; i < S.size(); ++i) {
    cout << S[i].first << " " << S[i].second << endl;
  }
  return 0;
}
