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