#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  int c = a;
  int d = b;
  int flag = 0;
  vector<pair<int, int> > vec;
  if (c <= d) {
    c = d + 1;
    while (c <= x) {
      d = b;
      while (d <= y) {
        if (c > d) {
          vec.push_back(make_pair(c, d));
          flag = 1;
          d += 1;
        } else {
          break;
        }
      }
      c += 1;
    }
  } else {
    while (c <= x) {
      d = b;
      while (d <= y) {
        if (c > d) {
          vec.push_back(make_pair(c, d));
          flag = 1;
          d += 1;
        } else {
          break;
        }
      }
      c += 1;
    }
  }
  if (!flag) {
    cout << 0 << endl;
  } else {
    cout << vec.size();
    cout << endl;
    for (int i = 0; i < vec.size(); i++) {
      cout << vec[i].first << " " << vec[i].second << endl;
    }
  }
}
