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