#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<int, int>> v;
  if (a <= b) {
    for (int i = b; i <= y; i++) {
      for (int j = i + 1; j <= x; j++) v.push_back(make_pair(j, i));
    }
  } else {
    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() << "\n";
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << "\n";
}
