#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1E-9;
const int INF = (int)1E9;
const long long INF64 = (long long)1E18;
const long double PI = 2 * acos(.0);
vector<pair<int, int> > pp;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  for (int i = a; i < (int)(x + 1); i++) {
    for (int j = b; j < (int)(y + 1); j++) {
      if (i > j) pp.push_back(make_pair(i, j));
    }
  }
  sort(pp.begin(), pp.end());
  cout << (pp).size() << endl;
  for (int i = 0; i < (int)((pp).size()); i++) {
    cout << pp[i].first << " " << pp[i].second << endl;
  }
  return 0;
}
