#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b, t, n, ct = 0;
  cin >> x >> y >> a >> b;
  stringstream ss;
  for (int i = a; i <= x; i++) {
    for (int j = b; j < i && j <= y; j++) {
      ss << i << " " << j << "\n";
      ct++;
    }
  }
  cout << ct << endl;
  cout << ss.str();
  return 0;
}
