#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
const int NPOS = -1;
const int MAX = 1005;
int a, b, x, y;
vector<pair<int, int> > ans;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> a >> b >> x >> y;
  for (int i = int(x); i < int(a + 1); ++i)
    for (int j = int(y); j < int(b + 1); ++j)
      if (i > j) ans.push_back(make_pair(i, j));
  cout << ans.size() << '\n';
  for (auto a : ans) cout << a.first << ' ' << a.second << '\n';
  return 0;
}
