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