#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int x, y, a, b;
  vector<pair<int, int>> v;
  cin >> x >> y >> a >> b;
  long long c = 0;
  if (a > b) {
    for (int i = a; i < x + 1; ++i) {
      for (int j = b; j < i; ++j) {
        if (j > y)
          break;
        else {
          c++;
          v.push_back({i, j});
        }
      }
    }
  } else {
    a = b + 1;
    for (int i = a; i < x + 1; ++i) {
      for (int j = b; j < i; ++j) {
        if (j > y)
          break;
        else {
          c++;
          v.push_back({i, j});
        }
      }
    }
  }
  cout << c << endl;
  for (int i = 0; i < c; ++i) {
    cout << v[i].first << " " << v[i].second << endl;
  }
  return 0;
}
