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