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