#include <bits/stdc++.h>
using namespace std;
int ToInt(string& s, int len) {
  int r = 0;
  for (int i = 0, max_ = (len); i < max_; ++i) {
    r *= 10;
    r += s[i] - '0';
  }
  return r;
}
int GCD(int a, int b) { return b != 0 ? GCD(b, a % b) : a; }
int LCM(int a, int b) { return a * (b / GCD(a, b)); }
long long Pow(long long n, long long e) {
  if (e == 0) return 1;
  if (e == 1)
    return n;
  else if (e & 1) {
    long long t = Pow(n, e / 2);
    return n * t * t;
  } else {
    long long t = Pow(n, e / 2);
    return t * t;
  }
}
int main() {
  int x, y, a, b;
  scanf("%d %d %d %d", &x, &y, &a, &b);
  int r = 0;
  vector<pair<int, int> > res;
  for (int i = (a), max_ = (x + 1); i < max_; ++i)
    for (int j = (b), max_ = (y + 1); j < max_; ++j) {
      if (j >= i) break;
      res.push_back(make_pair(i, j));
      ++r;
    }
  printf("%d\n", r);
  for (int i = 0, max_ = ((int)(res).size()); i < max_; ++i)
    printf("%d %d\n", res[i].first, res[i].second);
  return 0;
}
