#include <bits/stdc++.h>
using namespace std;
void sort_vec(vector<int> x, vector<int> b, int cnt) {
  int index;
  int max = 101;
  for (; cnt > 0; cnt--) {
    for (int j = 0; j < x.size(); j++) {
      if (x[j] < max) {
        index = j;
        max = x[j];
      }
    }
    cout << x[index] << " " << b[index] << endl;
    x[index] = 101;
    b[index] = 101;
  }
}
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<int> va;
  vector<int> vb;
  int cnt = 0;
  for (int i = b; i <= y; i++) {
    for (int j = a; j <= x; j++) {
      if (j <= i) continue;
      cnt++;
      va.push_back(j);
      vb.push_back(i);
    }
  }
  cout << cnt << endl;
  int index, tmp = 101;
  while (cnt > 0) {
    tmp = 101;
    for (int i = 0; i < va.size(); i++) {
      if (va[i] < tmp) {
        tmp = va[i];
        index = i;
      }
    }
    cout << va[index] << " " << vb[index] << endl;
    va.erase(va.begin() + index, va.begin() + index + 1);
    vb.erase(vb.begin() + index, vb.begin() + index + 1);
    cnt--;
  }
  return 0;
}
