#include <bits/stdc++.h>
using namespace std;
using namespace std;
vector<long long> arr;
vector<long long> st;
void updatest(long long p, long long beg, long long end, long long index);
void buildst(long long p, long long beg, long long end);
int rmq(long long p, long long beg, long long end, long long lb, long long ub);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<long long, long long> > v;
  for (long long i = a; i <= x; i++) {
    for (long long j = b; j <= y; j++) {
      if (i > j) {
        v.push_back(make_pair(i, j));
      }
    }
  }
  cout << v.size() << endl;
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << endl;
  }
  return 0;
}
void updatest(long long p, long long beg, long long end, long long index) {
  if (beg == end) {
    return;
  } else {
    long long c1 = 2 * p, c2 = 2 * p + 1;
    if (index > (beg + end) / 2) {
      updatest(c2, ((beg + end) / 2) + 1, end, index);
    } else {
      updatest(c1, beg, (beg + end) / 2, index);
    }
    if (arr[st[c1]] < arr[st[c2]])
      st[p] = st[c1];
    else
      st[p] = st[c2];
  }
}
void buildst(long long p, long long beg, long long end) {
  if (beg == end)
    st[p] = beg;
  else {
    long long c1 = 2 * p, c2 = 2 * p + 1;
    buildst(c1, beg, (beg + end) / 2);
    buildst(c2, ((beg + end) / 2) + 1, end);
    if (arr[st[c1]] <= arr[st[c2]])
      st[p] = st[c1];
    else
      st[p] = st[c2];
  }
}
int rmq(long long p, long long beg, long long end, long long lb, long long ub) {
  if (lb > end || ub < beg)
    return -1;
  else {
    if (lb <= beg && ub >= end)
      return st[p];
    else {
      long long rmq_left = rmq(2 * p, beg, (beg + end) / 2, lb, ub);
      long long rmq_right = rmq(2 * p + 1, ((beg + end) / 2) + 1, end, lb, ub);
      if (rmq_left == -1)
        return rmq_right;
      else if (rmq_right == -1)
        return rmq_left;
      else
        return (arr[rmq_left] < arr[rmq_right] ? rmq_left : rmq_right);
    }
  }
}
