#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream &operator<<(ostream &S, const vector<T> &v) {
  S << "(";
  for (int i = 0; i < v.size(); i++) {
    if (i) S << ", ";
    S << v[i];
  }
  S << ")";
  return S;
}
template <class T1, class T2>
ostream &operator<<(ostream &S, const pair<T1, T2> &p) {
  S << "(" << p.first << ", " << p.second << ")";
  return S;
}
template <class T>
T abs(T num) {
  return num > 0 ? num : -num;
}
template <class T>
T sqr(T num) {
  return num * num;
}
int x, y, a, b;
int main() {
  cin >> x >> y >> a >> b;
  vector<pair<int, int> > ans;
  for (int i = a; i <= x; i++)
    for (int j = b; j <= y; j++) {
      if (j >= i) break;
      ans.push_back(make_pair(i, j));
    }
  printf("%d\n", ((int)ans.size()));
  for (__typeof(ans.end()) it = ans.begin(); it != ans.end(); it++)
    printf("%d %d\n", it->first, it->second);
  return 0;
}
