#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<int, int> > sol;
  for (int i = a; i <= x; ++i)
    for (int j = b; j <= y; ++j)
      if (i > j) sol.push_back(make_pair(i, j));
  printf("%d\n", sol.size());
  for (int i = 0; i < sol.size(); ++i)
    printf("%d %d\n", sol[i].first, sol[i].second);
  return 0;
}
