#include <bits/stdc++.h>
using namespace std;
static const int INF = (1 << 29);
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
int x, y, a, b;
int main() {
  cin >> x >> y >> a >> b;
  vector<pair<int, int> > ans;
  for (int i = a; i <= x; i++) {
    for (int j = b; j <= y; j++) {
      if (i > j) ans.push_back(pair<int, int>(i, j));
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < (int)(ans.size()); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
