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