#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void umax(T &x, T y) {
  if (y > x) x = y;
}
template <class T>
inline void umin(T &x, T y) {
  if (y < x) x = y;
}
const int N = 2e3 + 5, B = 0x7fffffff;
int x, y, a, b;
vector<pair<int, int> > ans;
int main() {
  cin >> x >> y >> a >> b;
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j < i; j++) {
      if (i <= x && i >= a && j <= y && j >= b) ans.push_back({i, j});
    }
  }
  cout << (int)ans.size() << "\n";
  for (auto res : ans) cout << res.first << " " << res.second << "\n";
  return !1;
}
