#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
const double PI = 3.1415926535897932384626433832795;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
int x, y, a, b;
vector<pair<int, int> > cds;
vector<pair<int, int> >::const_iterator it;
int main(int argc, char** argv) {
  scanf("%d%d%d%d", &x, &y, &a, &b);
  for (int V = a; V <= x; V++) {
    for (int P = b; P <= y; P++) {
      if (V > P) {
        cds.push_back(make_pair(V, P));
      } else
        break;
    }
  }
  printf("%d\n", (int)cds.size());
  for (__typeof((cds).begin()) it = (cds).begin(); it != (cds).end(); it++) {
    printf("%d %d\n", it->first, it->second);
  }
  return 0;
}
