#include <bits/stdc++.h>
using namespace std;
int x, y, a, b, o, u[100000], v[100000];
int main() {
  cin >> x >> y >> a >> b;
  o = 0;
  for (int i = 1; i <= x; i++)
    for (int j = 1; j <= y; j++)
      if ((i >= a) && (j >= b) && (i > j)) ++o, u[o] = i, v[o] = j;
  cout << o << endl;
  for (int i = 1; i <= o; i++) cout << u[i] << " " << v[i] << endl;
  return 0;
}
