#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  int count = 0;
  for (int i = 0; i <= (x - a); i++) {
    for (int j = 0; j <= (y - b); j++) {
      int temp;
      if (a + i > b + j) {
        count++;
      }
    }
  }
  cout << count << endl;
  for (int i = 0; i <= (x - a); i++) {
    for (int j = 0; j <= (y - b); j++) {
      int temp;
      if (a + i > b + j) {
        cout << a + i << " " << b + j << endl;
      }
    }
  }
  return 0;
}
