#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<int, int>> res;
  for (int i = max(b + 1, a); i <= x; i++)
    for (int j = b; j < min(i, y + 1); j++) res.push_back({i, j});
  cout << res.size() << endl;
  for (auto i : res) {
    cout << i.first << " " << i.second << endl;
  }
  return 0;
}
