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