#include <bits/stdc++.h>
using namespace std;
int x, y, a, b;
vector<pair<int, int> > ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> x >> y;
  cin >> a >> b;
  for (int i = b; i <= y; i++) {
    for (int j = max(i + 1, a); j <= x; j++) {
      ans.push_back({j, i});
    }
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << endl;
  for (auto isi : ans) {
    cout << isi.first << " " << isi.second << endl;
  }
}
